This is an automated email from the ASF dual-hosted git repository.
rmaucher 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 3028754e19 Avoid any init parameter updates when conflicts are found
for filters
3028754e19 is described below
commit 3028754e1960f9f6ce140b975b8154fb2ed43cb4
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 bee5950194..9b3f310b9f 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -244,6 +244,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]