]> WPIA git - gigi.git/commitdiff
fix: an scrpyt error for empty passwords.
authorFelix Dörre <felix@dogcraft.de>
Wed, 14 Oct 2015 21:03:17 +0000 (23:03 +0200)
committerFelix Dörre <felix@dogcraft.de>
Wed, 14 Oct 2015 21:03:17 +0000 (23:03 +0200)
src/org/cacert/gigi/util/PasswordHash.java

index 04e686189339b1aa936d73f60dbf2fda44a2ffd4..4de92440dff10febe39a14ac31595c5e9e4446aa 100644 (file)
@@ -24,6 +24,9 @@ public class PasswordHash {
      *         </ul>
      */
     public static String verifyHash(String password, String hash) {
+        if (password == null || password.isEmpty()) {
+            return null;
+        }
         if (hash.contains("$")) {
             if (SCryptUtil.check(password, hash)) {
                 return hash;