diff --git a/src/auth/auth_htpasswd.py b/src/auth/auth_htpasswd.py index 7620dbe3..8291a877 100644 --- a/src/auth/auth_htpasswd.py +++ b/src/auth/auth_htpasswd.py @@ -1,4 +1,3 @@ -import crypt import logging import os @@ -108,6 +107,7 @@ def verify(self, username, password): return hashed_password == expected elif not os_utils.is_win(): + import crypt hashed_password = crypt.crypt(password, existing_password[:2]) return hashed_password == existing_password