Parcourir la source

forgotten bcrypt pattern extension

Peter Bieringer il y a 11 mois
Parent
commit
3a13ffbc51
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      radicale/auth/htpasswd.py

+ 1 - 1
radicale/auth/htpasswd.py

@@ -228,7 +228,7 @@ class Auth(auth.BaseAuth):
                                         htpasswd_ok = False
                                         skip = True
                                 else:
-                                    if digest.startswith("$2y$", 0, 4) and len(digest) == 60:
+                                    if re.match(r"^\$2(a|b|x|y)?\$", digest) and len(digest) == 60:
                                         if init is True:
                                             bcrypt_use += 1
                                         else: