From 47c02a4c678e46e0bebb354a6c16ab1d4022efe5 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Tue, 31 May 2022 15:55:07 +0200 Subject: [PATCH 1/1] change password generator --- src/ftp/utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ftp/utils.py b/src/ftp/utils.py index 0246b21..ada566a 100644 --- a/src/ftp/utils.py +++ b/src/ftp/utils.py @@ -1,6 +1,5 @@ import secrets -import string + def generate_password(length=10): - chars = string.ascii_letters + string.digits + string.punctuation - return ''.join(secrets.choice(chars) for i in range(length)) + return secrets.token_urlsafe(length) -- 2.20.1