Treat no password as invalid

This commit is contained in:
rijkvanzanten
2021-01-25 17:46:51 -05:00
parent 7abd2842d4
commit 99052add83

View File

@@ -46,6 +46,10 @@ export class AuthenticationService {
throw new InvalidCredentialsException();
}
if (!password || !user.password) {
throw new InvalidCredentialsException();
}
if (password !== undefined && (await argon2.verify(user.password, password)) === false) {
throw new InvalidCredentialsException();
}