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 2006/06/21 15:01:06 UTC
DO NOT REPLY [Bug 32328] - Make mod_rewrite escaping optional / expose internal map functions
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32328>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=32328
steven@acko.net changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|enhancement |normal
Keywords|PatchAvailable |
Summary|[PATCH] new rewrite map |Make mod_rewrite escaping
|function for ampersand |optional / expose internal
|escaping |map functions
------- Additional Comments From steven@acko.net 2006-06-21 13:01 -------
The same problem occurs with # (%23) and is even more destructive there:
RewriteRule ^/(.*) /index.php?title=$1&something=else
/Foo%#23Bar
will get rewritten to:
/index.php?title=Foo#Bar&something=else
The 'Bar&something=else' is interpreted as a fragment identifier (i.e. page anchor) and ignored on the
server side. The proposed patch is pretty short-sighted because it only treats one symptom, not the
cause.
Why does mod rewrite need to unescape these characters in the first place? Special characters like &
and # do not mean the same as %26 and %23 within in the context of an URL. By unescaping, this
information is being lost...
At the very least, this unescaping should be optional.
I think you can fix most issues by just using the 'escape' RewriteMap on the substitute, but this is far
from practical as it needs to be set globally for the entire server. This rules it out for hosted
environments where usually the most you get is .htaccess. Is there any reason why the built-in map
functions (toupper, tolower, escape, unescape) still need a very redundant RewriteMap directive?
So I guess the optimal solution would either:
- Allow you to turn off this automatic unescaping with a rewriterule flag (or similar) in htaccess
- or Allow you to use the built-in map functions directly without requiring those redundant RewriteMap
directives
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org