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

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


The following commit(s) were added to refs/heads/10.1.x by this push:
     new 1e4aa9f8d1 Fix last remaining double decoding issue
1e4aa9f8d1 is described below

commit 1e4aa9f8d19a2a898f05c7117a970f7276c8c267
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Jun 4 17:04:02 2026 +0100

    Fix last remaining double decoding issue
---
 java/org/apache/tomcat/util/descriptor/web/SecurityConstraint.java | 2 +-
 webapps/docs/changelog.xml                                         | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/descriptor/web/SecurityConstraint.java 
b/java/org/apache/tomcat/util/descriptor/web/SecurityConstraint.java
index 98e2372510..1499002fe8 100644
--- a/java/org/apache/tomcat/util/descriptor/web/SecurityConstraint.java
+++ b/java/org/apache/tomcat/util/descriptor/web/SecurityConstraint.java
@@ -608,7 +608,7 @@ public class SecurityConstraint extends XmlEncodingBase 
implements Serializable
         }
 
         if (create) {
-            collection.addPattern(urlPattern);
+            collection.addPatternDecoded(urlPattern);
             constraint.addCollection(collection);
             return constraint;
         }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 67be09e4d0..74872eb22e 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -239,6 +239,10 @@
         Improve the detection of cross-context dispatches when using a
         <code>RequestDispatcher</code>. (markt)
       </fix>
+      <fix>
+        Fix various instances of double decoding of URL patterns configured
+        either programmatically or in web.xml. (remm/markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">


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

Reply via email to