414840 Request.login() throws NPE if username is null

This commit is contained in:
Jan Bartel 2013-08-12 16:36:08 +10:00
parent 80988c8b1f
commit e3e9264a07
2 changed files with 6 additions and 0 deletions

View File

@ -212,6 +212,9 @@ public abstract class MappedLoginService extends AbstractLifeCycle implements Lo
*/
public UserIdentity login(String username, Object credentials)
{
if (username == null)
return null;
UserIdentity user = _users.get(username);
if (user==null)

View File

@ -116,6 +116,9 @@ public class DeferredAuthentication implements Authentication.Deferred
@Override
public Authentication login(String username, Object password, ServletRequest request)
{
if (username == null)
return null;
UserIdentity identity = _authenticator.login(username, password, request);
if (identity != null)
{