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
commit 459545016eaf2541dbf8f5c5cef483450ddb49a8 Author: opencode <[email protected]> AuthorDate: Wed Sep 30 10:23:45 2026 +0200 Initialize the ServerAuthModule before caching the SingleModuleServerAuthContext so a failed initialization is not cached permanently and can be re-attempted on next use --- .../apache/catalina/authenticator/jaspic/AuthConfigFactoryImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/org/apache/catalina/authenticator/jaspic/AuthConfigFactoryImpl.java b/java/org/apache/catalina/authenticator/jaspic/AuthConfigFactoryImpl.java index 07ccd7d0f9..9563d5d9fa 100644 --- a/java/org/apache/catalina/authenticator/jaspic/AuthConfigFactoryImpl.java +++ b/java/org/apache/catalina/authenticator/jaspic/AuthConfigFactoryImpl.java @@ -616,8 +616,10 @@ public class AuthConfigFactoryImpl extends AuthConfigFactory { if (serverAuthContext == null) { synchronized (serverAuthContextLock) { if (serverAuthContext == null) { - serverAuthContext = new SingleModuleServerAuthContext(serverAuthModule); + // Initialize before caching so that, if initialization fails, a half-initialized context is + // not cached permanently and initialization is re-attempted on the next use serverAuthModule.initialize(null, null, handler, properties); + serverAuthContext = new SingleModuleServerAuthContext(serverAuthModule); } } } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
