mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-08 10:34:25 +00:00
(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:
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user