You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Klaus Johannes Rusch <Kl...@atmedia.net> on 1999/07/18 22:50:13 UTC
mod_rewrite/4734: mod_rewrite does not preserve escaping in query string
>Number: 4734
>Category: mod_rewrite
>Synopsis: mod_rewrite does not preserve escaping in query string
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: apache
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Sun Jul 18 14:00:01 PDT 1999
>Last-Modified:
>Originator: KlausRusch@atmedia.net
>Organization:
apache
>Release: 1.3.4
>Environment:
Any
>Description:
With the following ruleset
RewriteEngine on
RewriteRule ^/keyword/av\ (.*) http://www.altavista.com/cgi-bin/query?pg=q\&kl=XX\&stype=stext\&q=$1 [L,R]
the URL is unescaped prior to matching, then the unescaped string is inserted on the right hand side in the query string, e.g. (request and Location: response header log)
"GET http://keyword.netscape.com/keyword/av%20test%20text HTTP/1.0"
redirects to
"http://www.altavista.com/cgi-bin/query?pg=q&kl=XX&stype=stext&q=test text"
>How-To-Repeat:
See above
>Fix:
Escape query string prior to concatinating r->args
>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 make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or ]
["Re: general/1098:"). If the subject doesn't match this ]
[pattern, your message will be misfiled and ignored. The ]
["apbugs" address is not added to the Cc line of messages from ]
[the database 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! ]