mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2025-01-06 01:20:28 +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) {
|
private static boolean hashMatch(String hash, String pass) {
|
||||||
|
if (hash.isBlank()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return hash.startsWith("$argon2") ?
|
return hash.startsWith("$argon2") ?
|
||||||
argon2PasswordEncoder.matches(pass, hash) :
|
argon2PasswordEncoder.matches(pass, hash) :
|
||||||
bcryptPasswordEncoder.matches(pass, hash);
|
bcryptPasswordEncoder.matches(pass, hash);
|
||||||
|
Loading…
Reference in New Issue
Block a user