Ticket #638: 10910_improved_auth_security.patch
| File 10910_improved_auth_security.patch, 1.1 KB (added by paul, 3 years ago) |
|---|
-
repository/server/src/java/org/outerj/daisy/authentication/impl/UserAuthenticatorImpl.java
89 89 90 90 public AuthenticatedUser authenticate(Credentials credentials) throws RepositoryException { 91 91 92 if(credentials.getLogin() == null || credentials.getLogin().trim().length() == 0) { 93 throw new AuthenticationException("Refusing to authenticate user with empty login"); 94 } 95 96 if(credentials.getPassword() == null || credentials.getPassword().trim().length() == 0) { 97 throw new AuthenticationException("Refusing to authenticate user without password"); 98 } 99 92 100 // Handle the special case of the user $system 93 101 if (credentials.getLogin().equals("$system")) { 94 102 throw new AuthenticationException("User $system is an internally used user that can not log in.");