diff --git a/src/yunohost/app.py b/src/yunohost/app.py index 025de2e19..84092580f 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -2104,4 +2104,4 @@ def random_password(length=8): import random char_set = string.ascii_uppercase + string.digits + string.ascii_lowercase - return ''.join(random.sample(char_set, length)) + return ''.join([random.SystemRandom().choice(char_set) for x in range(length)])