Author: funkman Date: Sun May 20 11:33:16 2007 New Revision: 539907 URL: http://svn.apache.org/viewvc?view=rev&rev=539907 Log: JNDIRealm does not catch NullPointerException for Sun's LDAP provider
Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java?view=diff&rev=539907&r1=539906&r2=539907 ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java Sun May 20 11:33:16 2007 @@ -808,6 +808,23 @@ // Authenticate the specified username if possible principal = authenticate(context, username, credentials); + } catch (NullPointerException e) { + /* BZ 42449 - Kludge Sun's LDAP provider + with broken SSL + */ + // log the exception so we know it's there. + containerLog.warn(sm.getString("jndiRealm.exception"), e); + + // close the connection so we know it will be reopened. + if (context != null) + close(context); + + // open a new directory context. + context = open(); + + // Try the authentication again. + principal = authenticate(context, username, credentials); + } catch (CommunicationException e) { // log the exception so we know it's there. Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?view=diff&rev=539907&r1=539906&r2=539907 ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Sun May 20 11:33:16 2007 @@ -18,7 +18,12 @@ <subsection name="Catalina"> <changelog> <fix> - <bug>42444</bug>: prevent NPE + <bug>42449</bug>: + JNDIRealm does not catch NullPointerException for Sun's + LDAP provider (See bug for details) (funkman) + </fix> + <fix> + <bug>42444</bug>: prevent NPE for AccessLogValve Patch provided by Nils Hammar (funkman) </fix> <fix> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]