https://issues.apache.org/bugzilla/show_bug.cgi?id=49642
Summary: mod_rewrite mistakes encoded question mark as
path/query string separator
Product: Apache httpd-2
Version: 2.2.15
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: mod_rewrite
AssignedTo: [email protected]
ReportedBy: [email protected]
A resource with a encoded question mark (%3F) will be split up, by mod_rewrite,
into name and args. Expected result would be for mod_rewrite to leave the name
intact.
# From rewrite.log
(2) init rewrite engine with requested uri /trigrewrite_filename?args
(3) applying pattern '^/trigrewrite_(.*)' to uri '/trigrewrite_filename?args'
(2) rewrite '/trigrewrite_filename?args' -> '/filename?args'
(3) split uri=/filename?args -> uri=/filename, args=args
(2) local path result: /filename
# Vhost conf
Listen 9004
<VirtualHost *:9004>
Servername rewritebug
DocumentRoot /home/apache/www/rewrite
# AllowEncodedSlashes On
RewriteEngine On
RewriteLog "logs/rewrite.log"
RewriteLogLevel 9
RewriteRule ^/trigrewrite_(.*) /$1 [L]
<Directory "/home/apache/www/rewrite">
Options None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
# From access_log
"GET /trigrewrite_filename%3Fargs HTTP/1.1" 404 223
# index.html
test rewrite
<script type="text/javascript">
var uri = '/trigrewrite_filename%3Fargs';
document.write('<iframe src="'+uri +'"></iframe>');
</script>
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]