You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Jason Doobie <do...@wwa.com> on 1998/08/21 16:42:47 UTC

mod_alias/2888: RedirectMatch does not correctly deal with URLs which need to be escaped. (simular to PR#1155)

>Number:         2888
>Category:       mod_alias
>Synopsis:       RedirectMatch does not correctly deal with URLs which need to be escaped. (simular to PR#1155)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Fri Aug 21 07:50:00 PDT 1998
>Last-Modified:
>Originator:     doobie@wwa.com
>Organization:
apache
>Release:        1.3.1
>Environment:
Linux, debian 1.3.1-3 package	
>Description:
This problem was supposed to have been fixed by PR#1155, however I think the patched code was placed in a section that allows it to not work if your using CGI scripts.

I have done the following in my httpd.conf file for a certain domain:

RedirectMatch /(.*)$ http://www.domain.com/test.html?structure=$1

It writes it to the log as File does not exist: ..../test.html?structure=whatever.
>How-To-Repeat:
The site is on an Intranet of mine but heres a slice of the httpd.conf file I use

<virtualhost ..>
...
ServerName olddomain.com
RedirectMatch /(.*)$ http://www.domain.com/test.html?structure=$1
</virtualhost>

And if you go to:

http://www.olddomain.com/this_is_whatever.html

it'll forward it to http://www.domain.com/test.html?structure=this_is_whatever.html

However because when it looks for the file/parses the URL for CGI data it sees the ? %3f.
>Fix:
Change the location of parsing escaped characters to be sooner, or as they are read in from the client.
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request ]
[from a developer.                                      ]
[Reply only with text; DO NOT SEND ATTACHMENTS!         ]