This is an automated email from the ASF dual-hosted git repository.

markt-asf pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/11.0.x by this push:
     new 05fdbbefd9 Ensure capture groups from RewriteCond reflect the current 
request
05fdbbefd9 is described below

commit 05fdbbefd9956c67c170c9537646965166a39987
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Aug 13 11:35:37 2026 +0100

    Ensure capture groups from RewriteCond reflect the current request
---
 java/org/apache/catalina/valves/rewrite/RewriteCond.java | 1 +
 webapps/docs/changelog.xml                               | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/java/org/apache/catalina/valves/rewrite/RewriteCond.java 
b/java/org/apache/catalina/valves/rewrite/RewriteCond.java
index 6eaa2719a8..5203c7ff8a 100644
--- a/java/org/apache/catalina/valves/rewrite/RewriteCond.java
+++ b/java/org/apache/catalina/valves/rewrite/RewriteCond.java
@@ -74,6 +74,7 @@ public class RewriteCond {
                 matcher.set(m);
                 return true;
             } else {
+                matcher.set(null);
                 return false;
             }
         }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 841c6caf32..0cac92408a 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -118,6 +118,10 @@
         this fix, paths containing literal <code>'?'</code> characters were
         truncated. (markt)
       </fix>
+      <fix>
+        Ensure that capture groups from a <code>RewriteCond</code> always
+        reflect the result of the current request. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to