Skip to content

Commit

Permalink
Fix NPE when attempting to log in with an unknown username (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
cseppan committed Jun 26, 2022
1 parent 96476fb commit 84f34b7
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ public User doLogin(String username, String password) throws EmfException {
userAdmin.authenticate(username, new PasswordGenerator().encrypt(password));
} catch (EmfException e) {
User user = userAdmin.getUser(username);
if (user == null) {
throw e;
}

user = userAdmin.obtainLocked(userAdmin.getUser(username), userAdmin.getUser(username));

Expand Down

0 comments on commit 84f34b7

Please sign in to comment.