diff --git a/src/user.py b/src/user.py index cda048729..2302ef271 100644 --- a/src/user.py +++ b/src/user.py @@ -21,7 +21,6 @@ import re import pwd import grp import random -import string import subprocess import copy from logging import getLogger diff --git a/src/utils/password.py b/src/utils/password.py index 0e48371f1..de9ef2c48 100644 --- a/src/utils/password.py +++ b/src/utils/password.py @@ -21,7 +21,6 @@ import os import string import subprocess import yaml -import passlib.hash SMALL_PWD_LIST = [ "yunohost", @@ -73,7 +72,7 @@ def assert_password_is_strong_enough(profile, password): def _hash_user_password(password): - import passlib + import passlib.hash # passlib will returns something like: # $6$rounds=656000$AwCIMolbTAyQhtev$46UvYfVgs.k0Bt6fLTekBHyCcCFkix/NNfgAWiICX.9YUPVYZ3PsIAwY99yP5/tXhg2sYBaAhKj6W3kuYWaR3. # cf https://passlib.readthedocs.io/en/stable/modular_crypt_format.html#modular-crypt-format