(tomcat) branch 10.1.x updated: Fix handling of login-config merge conflict

[email protected]
Newsgroups gmane.comp.jakarta.tomcat.devel
Message-ID <178333341654.282913.14843380997004423774@gitbox3-he-fi.apache.org>
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 e3352936a5 Fix handling of login-config merge conflict
e3352936a5 is described below

commit e3352936a5e3cb07004a34ca43c18bef527d4b8f
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Jul 6 11:21:54 2026 +0100

    Fix handling of login-config merge conflict
---
 java/org/apache/tomcat/util/descriptor/web/WebXml.java | 1 +
 webapps/docs/changelog.xml                             | 8 ++++++++
 2 files changed, 9 insertions(+)

diff --git a/java/org/apache/tomcat/util/descriptor/web/WebXml.java b/java/org/apache/tomcat/util/descriptor/web/WebXml.java
index 48abe7b934..550a87f6f4 100644
--- a/java/org/apache/tomcat/util/descriptor/web/WebXml.java
+++ b/java/org/apache/tomcat/util/descriptor/web/WebXml.java
@@ -2234,6 +2234,7 @@ public class WebXml extends XmlEncodingBase implements DocumentProperties.Charse
                     } else {
                         log.error(
                                 sm.getString("webXml.mergeConflictLoginConfig", fragment.getName(), fragment.getURL()));
+                        return false;
                     }
                 }
             }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 8e94290f34..d00963b2f5 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -108,6 +108,14 @@
   issues do not "pop up" wrt. others).
 -->
 <section name="Tomcat 10.1.58 (schultz)" rtext="in development">
+  <subsection name="Catalina">
+    <changelog>
+      <fix>
+        Ensure that a <code>login-config</code> conflict when merging web.xml
+        fragments triggers a deployment failure. (markt)
+      </fix>
+    </changelog>
+  </subsection>
   <subsection name="Coyote">
     <changelog>
       <update>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.