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

remm pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new 1086dc53f2 Fix failure trying to persist configuration
1086dc53f2 is described below

commit 1086dc53f2994637fd6a441f0c554a7e419c5f27
Author: remm <r...@apache.org>
AuthorDate: Wed Jul 12 15:44:11 2023 +0200

    Fix failure trying to persist configuration
    
    The internal credential handler is private and should be skipped (it is
    added on start).
---
 java/org/apache/catalina/storeconfig/RealmSF.java | 3 ++-
 webapps/docs/changelog.xml                        | 4 ++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/storeconfig/RealmSF.java 
b/java/org/apache/catalina/storeconfig/RealmSF.java
index a4ad84e364..1463ba3a63 100644
--- a/java/org/apache/catalina/storeconfig/RealmSF.java
+++ b/java/org/apache/catalina/storeconfig/RealmSF.java
@@ -85,7 +85,8 @@ public class RealmSF extends StoreFactoryBase {
         }
         // Store nested <CredentialHandler> element
         CredentialHandler credentialHandler = ((Realm) 
aRealm).getCredentialHandler();
-        if (credentialHandler != null) {
+        if (credentialHandler != null
+                && 
!(credentialHandler.getClass().getName().equals("org.apache.catalina.realm.CombinedRealm$CombinedRealmCredentialHandler")))
 {
             storeElement(aWriter, indent, credentialHandler);
         }
     }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 88e735bc4c..1d155a34d2 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -115,6 +115,10 @@
         Make parsing of <code>ExtendedAccessLogValve</code> patterns more
         robust. (markt)
       </fix>
+      <fix>
+        Fix failure trying to persist configuration for an internal credential
+        handler. (remm)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to