mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-12-12 21:30:29 +05:30
explicitly reject empty hashes
This commit is contained in:
parent
e4ba19556c
commit
77cd736c06
@ -96,6 +96,9 @@ public class UserHandlers {
|
||||
}
|
||||
|
||||
private static boolean hashMatch(String hash, String pass) {
|
||||
if (hash.isBlank()) {
|
||||
return false;
|
||||
}
|
||||
return hash.startsWith("$argon2") ?
|
||||
argon2PasswordEncoder.matches(pass, hash) :
|
||||
bcryptPasswordEncoder.matches(pass, hash);
|
||||
|
Loading…
Reference in New Issue
Block a user