mirror of
https://github.com/theonedev/onedev.git
synced 2025-12-08 18:26:30 +00:00
Fix issue #889 - Security: login dialog
This commit is contained in:
parent
0e52b32cae
commit
a2fee5a6ac
@ -174,10 +174,10 @@ public class PasswordAuthorizingRealm extends AbstractAuthorizingRealm {
|
||||
return newUser(userNameOrEmailAddressValue, authenticated, authenticator.getDefaultGroup());
|
||||
}
|
||||
} else {
|
||||
throw new UnknownAccountException("Unknown user");
|
||||
throw new UnknownAccountException("Invalid credentials");
|
||||
}
|
||||
} else {
|
||||
throw new UnknownAccountException("Unknown user");
|
||||
throw new UnknownAccountException("Invalid credentials");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
if (e instanceof AuthenticationException) {
|
||||
|
||||
@ -100,10 +100,8 @@ public class LoginPage extends SimplePage {
|
||||
} else {
|
||||
afterLogin(user);
|
||||
}
|
||||
} catch (IncorrectCredentialsException e) {
|
||||
error("Incorrect credentials");
|
||||
} catch (UnknownAccountException e) {
|
||||
error("Unknown user name");
|
||||
} catch (IncorrectCredentialsException|UnknownAccountException e) {
|
||||
error("Invalid credentials");
|
||||
} catch (AuthenticationException ae) {
|
||||
error(ae.getMessage());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user