You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2017/01/22 02:08:54 UTC

[Bug 60624] New: mod_include DOCUMENT_URI in "if" expression has different value than when echoed

https://bz.apache.org/bugzilla/show_bug.cgi?id=60624

            Bug ID: 60624
           Summary: mod_include DOCUMENT_URI in "if" expression has
                    different value than when echoed
           Product: Apache httpd-2
           Version: 2.4.25
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_include
          Assignee: bugs@httpd.apache.org
          Reporter: jan-bugreport@gmx.de
  Target Milestone: ---

Created attachment 34657
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34657&action=edit
output

When DOCUMENT_URI is echoed from inside an included file, it shows the path of
the including file. However, when a regexp match is performed on DOCUMENT_URI
within an if expression and the value is printed via a backreference, the
printed value is the path of the included file.

This makes debugging sessions very interesting, and I suspect that most people
simply enable the legacy syntax. As a result, I suspect the new syntax may not
have been sufficiently tested.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 60624] mod_include DOCUMENT_URI in "if" expression has different value than when echoed

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60624

--- Comment #4 from Hank Ibell <hw...@gmail.com> ---
Created attachment 34666
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34666&action=edit
Proposed patch for 2.4.x

Proposed patch for 2.4.x

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 60624] mod_include DOCUMENT_URI in "if" expression has different value than when echoed

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60624

Christophe JAILLET <ch...@wanadoo.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #6 from Christophe JAILLET <ch...@wanadoo.fr> ---
This is part of apache 2.4.26, see r1788448

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 60624] mod_include DOCUMENT_URI in "if" expression has different value than when echoed

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60624

Eric Covener <co...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |FixedInTrunk,
                   |                            |PatchAvailable

--- Comment #5 from Eric Covener <co...@gmail.com> ---
http://svn.apache.org/viewvc?view=revision&revision=1780095

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 60624] mod_include DOCUMENT_URI in "if" expression has different value than when echoed

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60624

Hank Ibell <hw...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 60624] mod_include DOCUMENT_URI in "if" expression has different value than when echoed

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60624

--- Comment #2 from jan-bugreport@gmx.de ---
Created attachment 34659
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34659&action=edit
included.shtml to reproduce

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 60624] mod_include DOCUMENT_URI in "if" expression has different value than when echoed

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60624

--- Comment #1 from jan-bugreport@gmx.de ---
Created attachment 34658
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34658&action=edit
main.shtml to reproduce

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 60624] mod_include DOCUMENT_URI in "if" expression has different value than when echoed

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60624

Szőgyényi Gábor <sz...@freemail.hu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |szg0000@freemail.hu

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 60624] mod_include DOCUMENT_URI in "if" expression has different value than when echoed

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60624

--- Comment #3 from Hank Ibell <hw...@gmail.com> ---
Created attachment 34665
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34665&action=edit
Proposed patch

Proposed patch is to send the DOCUMENT_URI if found inside the subprocess
environment of a request when evaluating request variables. Otherwise it just
sends the request stored in the request's uri field.

I found DOCUMENT_URI is used in two modules: mod_includes and mod_ext_filter so
preferring the DOCUMENT_URI if found in the subprocess environment over the uri
field looks to be a safe change.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org