tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1815829 - in /tomcat/trunk: java/org/apache/catalina/authenticator/jaspic/AuthConfigFactoryImpl.java webapps/docs/changelog.xml
Date Mon, 20 Nov 2017 18:26:28 GMT
Author: markt
Date: Mon Nov 20 18:26:28 2017
New Revision: 1815829

URL: http://svn.apache.org/viewvc?rev=1815829&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=61782
When calling AuthConfigFactoryImpl.doRegisterConfigProvider() and the requested JASPIC config
provider class is found by the web application class loader, do not attempt to load the class
with the class loader that loaded the JASPIC API.
Patch provided by Lazar.
This closes #90

Modified:
    tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/AuthConfigFactoryImpl.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/AuthConfigFactoryImpl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/AuthConfigFactoryImpl.java?rev=1815829&r1=1815828&r2=1815829&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/AuthConfigFactoryImpl.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/authenticator/jaspic/AuthConfigFactoryImpl.java
Mon Nov 20 18:26:28 2017
@@ -105,7 +105,7 @@ public class AuthConfigFactoryImpl exten
             log.debug(sm.getString("authConfigFactoryImpl.registerClass",
                     className, layer, appContext));
         }
-        Class<?> clazz;
+        Class<?> clazz = null;
         AuthConfigProvider provider = null;
         try {
             clazz = Class.forName(className, true, Thread.currentThread().getContextClassLoader());
@@ -113,7 +113,9 @@ public class AuthConfigFactoryImpl exten
             // Ignore so the re-try below can proceed
         }
         try {
-            clazz = Class.forName(className);
+            if (clazz == null) {
+                clazz = Class.forName(className);
+            }
             Constructor<?> constructor = clazz.getConstructor(Map.class, AuthConfigFactory.class);
             provider = (AuthConfigProvider) constructor.newInstance(properties, null);
         } catch (ReflectiveOperationException | IllegalArgumentException e) {

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1815829&r1=1815828&r2=1815829&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Nov 20 18:26:28 2017
@@ -109,6 +109,13 @@
         when the layer and/or application context are <code>null</code>. Patch
         provided by Lazar. (markt)
       </fix>
+      <fix>
+        <bug>61782</bug>: When calling
+        <code>AuthConfigFactoryImpl.doRegisterConfigProvider()</code> and the
+        requested JASPIC config provider class is found by the web application
+        class loader, do not attempt to load the class with the class loader
+        that loaded the JASPIC API. Patch provided by Lazar. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">



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


Mime
View raw message