diff --git a/src/main/java/me/kavin/piped/server/handlers/auth/UserHandlers.java b/src/main/java/me/kavin/piped/server/handlers/auth/UserHandlers.java index b3471dc..1412ce8 100644 --- a/src/main/java/me/kavin/piped/server/handlers/auth/UserHandlers.java +++ b/src/main/java/me/kavin/piped/server/handlers/auth/UserHandlers.java @@ -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);