// 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.
<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>