]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1909073 from trunk:
authorEric Covener <covener@apache.org>
Tue, 11 Apr 2023 21:37:47 +0000 (21:37 +0000)
committerEric Covener <covener@apache.org>
Tue, 11 Apr 2023 21:37:47 +0000 (21:37 +0000)
PR66563: escaping of url releated server vars

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

docs/manual/mod/mod_rewrite.xml
docs/manual/rewrite/flags.xml

index b92cb69d42f59b17e616f6c8f808c5aa7220b21f..49cda812b6bfe29dabcbd806bf3448caffe44179 100644 (file)
@@ -654,7 +654,11 @@ AliasMatch "^/myapp" "/opt/myapp-1.2.3"
                   <dd>The path component of the requested URI,
                   such as "/index.html".  This notably excludes the
                   query string which is available as its own variable
-                  named <code>QUERY_STRING</code>.</dd>
+                  named <code>QUERY_STRING</code>. The value returned for
+                  both <code>REQUEST_URI</code> and <code>QUERY_STRING</code>
+                  has already been %-decoded, to re-encoded it pass it through
+                  the "escape" <a href="#mapfunc">mapping-function</a>.
+                  </dd>
 
                   <dt><code>THE_REQUEST</code></dt>
 
@@ -1326,7 +1330,8 @@ cannot use <code>$N</code> in the substitution string!
     <tr>
         <td>B</td>
         <td>Escape non-alphanumeric characters in backreferences <em>before</em>
-        applying the transformation. <em><a
+        applying the transformation. For similar escaping of server-variables, see
+        the "escape" <a href="#mapfunc">mapping-function</a>.<em><a
         href="../rewrite/flags.html#flag_b">details ...</a></em></td>
     </tr>
      <tr>
index 122f50a79d6a797d1117240af05d1b85be95c3d5..1229d1ab95825da2fab69bef1434d8203bc2b56d 100644 (file)
@@ -76,6 +76,10 @@ so backreferences are unescaped at the time they are applied.
 Using the B flag, non-alphanumeric characters in backreferences
 will be escaped. For example, consider the rule:</p>
 
+<p>For similar escaping of server-variables, see
+    the "escape" <a href="#mapfunc">mapping-function</a></p>
+
+
 <highlight language="config">
 RewriteRule "^search/(.*)$" "/search.php?term=$1"
 </highlight>