]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
mod_rewrite: Better question mark tracking to avoid UnsafeAllow3F. PR 69197.
authorYann Ylavic <ylavic@apache.org>
Sat, 27 Jul 2024 13:35:53 +0000 (13:35 +0000)
committerYann Ylavic <ylavic@apache.org>
Sat, 27 Jul 2024 13:35:53 +0000 (13:35 +0000)
commita0a68b99d131741c1867cff321424892838fc4b3
tree43561e0291d09777284609602934a27c7124cb81
parent591934e14f1e603ba3f69573b81f3af17b0aa746
mod_rewrite: Better question mark tracking to avoid UnsafeAllow3F.  PR 69197.

Track in do_expand() whether a '?' in the uri-path comes from a literal in
the substitution string or from an expansion (variable, lookup, ...).
In the former case it's safe to assume that it's the query-string separator
but for the other case it's not (could be a decoded %3f from r->uri).

This allows to avoid [UnsafeAllow3F] for most cases.

Merges r1919325 from trunk
Reviewed by: ylavic, covener, jorton
Github: closes #462

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1919545 13f79535-47bb-0310-9956-ffa450edef68
modules/mappers/mod_rewrite.c