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

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


The following commit(s) were added to refs/heads/main by this push:
     new d389a2c7eb Review "Bound the rewrite rule loop and reject negative 
skip values"
d389a2c7eb is described below

commit d389a2c7ebb5fc7f0c8c310762744e0ada2b259e
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 163a1e1601..c8edf67137 100644
--- a/java/org/apache/catalina/valves/rewrite/LocalStrings.properties
+++ b/java/org/apache/catalina/valves/rewrite/LocalStrings.properties
@@ -25,7 +25,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