From 3a13ffbc5120940c6d321bd1760358ddc5c87959 Mon Sep 17 00:00:00 2001 From: Peter Bieringer Date: Mon, 10 Mar 2025 06:00:30 +0100 Subject: [PATCH] forgotten bcrypt pattern extension --- radicale/auth/htpasswd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radicale/auth/htpasswd.py b/radicale/auth/htpasswd.py index 11700db9..8ac77372 100644 --- a/radicale/auth/htpasswd.py +++ b/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: