(Scott Phillips) Added protection against NPEs during authentication.

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2851 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Scott Phillips
2008-03-18 05:26:07 +00:00
parent e5c8802032
commit d72aafe3e4
3 changed files with 53 additions and 42 deletions

View File

@@ -145,11 +145,15 @@ public class LDAPAuthentication
{
log.info(LogManager.getHeader(context, "auth", "attempting trivial auth of user="+netid));
// Skip out when no netid or password is given.
if (netid == null || password == null)
return BAD_ARGS;
// Locate the eperson
EPerson eperson = null;
try
{
eperson = EPerson.findByNetid(context, netid.toLowerCase());
eperson = EPerson.findByNetid(context, netid.toLowerCase());
}
catch (SQLException e)
{