Return-Path: Delivered-To: apache-bugdb-archive@hyperreal.org Received: (qmail 22603 invoked by uid 6000); 18 Jul 1999 21:00:07 -0000 Received: (qmail 22517 invoked by uid 2001); 18 Jul 1999 21:00:02 -0000 Received: (qmail 17296 invoked by uid 2012); 18 Jul 1999 20:50:13 -0000 Message-Id: <19990718205013.17295.qmail@hyperreal.org> Date: 18 Jul 1999 20:50:13 -0000 From: Klaus Johannes Rusch Reply-To: KlausRusch@atmedia.net To: apbugs@hyperreal.org X-Send-Pr-Version: 3.2 Subject: mod_rewrite/4734: mod_rewrite does not preserve escaping in query string Sender: apache-bugdb-owner@apache.org Precedence: bulk >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 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! ]