diff --git a/docs/manual/rewrite/flags.xml b/docs/manual/rewrite/flags.xml index f4557960b87..cd0307c4b8a 100644 --- a/docs/manual/rewrite/flags.xml +++ b/docs/manual/rewrite/flags.xml @@ -1160,15 +1160,15 @@ The L flag can be useful in this context to end the
UnsafeAllow3F

Setting this flag is required to allow a rewrite to continue If the HTTP request being written has an encoded question mark, '%3f', and the - rewritten result has a '?' in the substitution. This protects from a malicious + rewritten result has a '?' in cases where the first question mark + would be interpreted as separating the substituted path from the substituted + query. This protects from a malicious URL taking advantage of a capture and re-substitution of the encoded - question mark.

+ question mark to truncate the path.

-# A PHP front controller that routes all requests via a query parameter. -# Without UnsafeAllow3F, a request like /page%3Fname=test would return -# 403 Forbidden because the rewritten substitution contains '?' while -# the original request contains an encoded '%3F'. +# Without UnsafeAllow3F, a request like /page%3Fname=test would be +# rejected because the path would be truncated. RewriteCond "%{REQUEST_FILENAME}" !-f RewriteCond "%{REQUEST_FILENAME}" !-d RewriteRule "(.+)" "index.php?route=$1" [L,QSA,UnsafeAllow3F]