httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 32985] New: - strange variable truncation with SSI regexes and HTTP_COOKIE
Date Fri, 07 Jan 2005 08:59:23 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32985>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32985

           Summary: strange variable truncation with SSI regexes and
                    HTTP_COOKIE
           Product: Apache httpd-2.0
           Version: 2.0.52
          Platform: PC
               URL: http://nodivisions.com/test.shtml
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: mod_include
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: theant@nodivisions.com
                CC: theant@nodivisions.com


For certain lengths of HTTP_COOKIE, it seems that SSI regexes (in "expr="
statements) fail to capture the full length of the HTTP_COOKIE variable when
using capturing parentheses.  Here's an example, tested on 2.0.52 on two
different Linux servers:


<!--#set var="HTTP_COOKIE"
value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=n"
-->

Your HTTP_COOKIE is:

"<!--#echo var="HTTP_COOKIE" -->"

<!--#if expr="$HTTP_COOKIE = /(.+)/" -->
...but captured from a regex using (.+), it's truncated to this:

"<!--#echo var="1" -->"
<!--#endif -->


In case this form/webpage messes with that code, just visit this URL:

http://nodivisions.com/test.shtml

Note that the actual value of HTTP_COOKIE doesn't matter; I found this bug while
using 3 real cookie values in it, but then replaced them with all Xes to test. 
Only the length seems to matter.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message