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 be071ae7c7 Review "Bound the rewrite rule loop and reject negative 
skip values"
be071ae7c7 is described below

commit be071ae7c78aade498fb46032bc9c6fe5a9ff0f4
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Oct 29 17:13:22 2026 +0000

    Review "Bound the rewrite rule loop and reject negative skip values"
    
    Included the trigger URI in the log output
---
 java/org/apache/catalina/valves/rewrite/LocalStrings.properties | 2 +-
 java/org/apache/catalina/valves/rewrite/RewriteValve.java       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/valves/rewrite/LocalStrings.properties 
b/java/org/apache/catalina/valves/rewrite/LocalStrings.properties
index 94ca96636c..c668d146be 100644
--- a/java/org/apache/catalina/valves/rewrite/LocalStrings.properties
+++ b/java/org/apache/catalina/valves/rewrite/LocalStrings.properties
@@ -28,7 +28,7 @@ rewriteValve.closeError=Error closing configuration
 rewriteValve.invalidFlags=Invalid flag in [{0}] flags [{1}]
 rewriteValve.invalidLine=Invalid line [{0}]
 rewriteValve.invalidMapClassName=Invalid map class name [{0}]
-rewriteValve.maxRounds=Too many rounds of rewrite rules [{0}] without the 
rewriting completing. Further rewriting was stopped.
+rewriteValve.maxRounds=Too many rounds of rewrite rules [{0}] triggered for 
URI [{1}] without the rewriting completing. Further rewriting was stopped.
 rewriteValve.noConfiguration=No configuration resource found [{0}]
 rewriteValve.readConfiguration=Read configuration from [/WEB-INF/{0}]
 rewriteValve.readError=Error reading configuration
diff --git a/java/org/apache/catalina/valves/rewrite/RewriteValve.java 
b/java/org/apache/catalina/valves/rewrite/RewriteValve.java
index 79418b83e4..48d74c6a9c 100644
--- a/java/org/apache/catalina/valves/rewrite/RewriteValve.java
+++ b/java/org/apache/catalina/valves/rewrite/RewriteValve.java
@@ -560,7 +560,7 @@ public class RewriteValve extends ValveBase {
                 if (rule.isNext() && newtest != null) {
                     if (rounds >= MAX_REWRITE_ROUNDS) {
                         
containerLog.warn(sm.getString("rewriteValve.maxRounds",
-                                Integer.valueOf(MAX_REWRITE_ROUNDS)));
+                                Integer.valueOf(MAX_REWRITE_ROUNDS), 
request.getRequestURI()));
                         break;
                     }
                     rounds++;


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

Reply via email to