-
Bug
-
Resolution: Done
-
Trivial
-
JBossAS-4.0.4.GA
-
None
-
Workaround Exists
-
If an anonymous bind to the LDAP-Server is allowed no bindDN and bindCredential is supplied in login-context.xml. This causes the LoginModule to fail due to an NPE. The responsible lines are around 485:
env.setProperty(Context.SECURITY_PRINCIPAL, dn);
env.put(Context.SECURITY_CREDENTIALS, credential);
The HashMap.put fails if dn or credetials are null. The obvious solution is to change the lines to:
if (dn != null)
env.setProperty(Context.SECURITY_PRINCIPAL, dn);
if (credential != null)
env.put(Context.SECURITY_CREDENTIALS, credential);