fnp
/
cas.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
40ba7c2
)
change password generator
author
Radek Czajka
<rczajka@rczajka.pl>
Tue, 31 May 2022 13:55:07 +0000
(15:55 +0200)
committer
Radek Czajka
<rczajka@rczajka.pl>
Tue, 31 May 2022 13:55:07 +0000
(15:55 +0200)
src/ftp/utils.py
patch
|
blob
|
history
diff --git
a/src/ftp/utils.py
b/src/ftp/utils.py
index
0246b21
..
ada566a
100644
(file)
--- a/
src/ftp/utils.py
+++ b/
src/ftp/utils.py
@@
-1,6
+1,5
@@
import secrets
import secrets
-import string
+
def generate_password(length=10):
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)