This is an automated email from the ASF dual-hosted git repository.
rmaucher 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 f4a09f4072 Avoid any init parameter updates when conflicts are found
for filters
f4a09f4072 is described below
commit f4a09f40725148d5899eb439a7b66bdd005868ee
Author: remm <[email protected]>
AuthorDate: Thu May 21 09:57:59 2026 +0200
Avoid any init parameter updates when conflicts are found for filters
This was already done for Servlets.
---
java/org/apache/catalina/core/ApplicationFilterRegistration.java | 6 ++++--
webapps/docs/changelog.xml | 5 +++++
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/catalina/core/ApplicationFilterRegistration.java
b/java/org/apache/catalina/core/ApplicationFilterRegistration.java
index 3aea0ccc75..5616d612c4 100644
--- a/java/org/apache/catalina/core/ApplicationFilterRegistration.java
+++ b/java/org/apache/catalina/core/ApplicationFilterRegistration.java
@@ -198,8 +198,10 @@ public class ApplicationFilterRegistration implements
FilterRegistration.Dynamic
// Have to add in a separate loop since spec requires no updates at all
// if there is an issue
- for (Map.Entry<String,String> entry : initParameters.entrySet()) {
- setInitParameter(entry.getKey(), entry.getValue());
+ if (conflicts.isEmpty()) {
+ for (Map.Entry<String,String> entry : initParameters.entrySet()) {
+ setInitParameter(entry.getKey(), entry.getValue());
+ }
}
return conflicts;
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 0f27ecbdf3..406791beb9 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -144,6 +144,11 @@
Improve robustness on using <code>Pipeline.setBasic</code> on a running
pipeline. (remm)
</fix>
+ <fix>
+ Avoid any init parameter updates when conflicts are found for filters,
+ similar to what is done for servlets, as required by the servlet
+ specification. (remm)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]