fix: [role_manager] add password characters

pull/422/head
Terrtia 2019-07-05 15:23:16 +02:00
parent add0a95814
commit 8483ec8f90
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ def login_analyst(func):
###############################################################
###############################################################
def gen_password(length=30, charset="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()"):
def gen_password(length=30, charset="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_!@#$%^&*()"):
random_bytes = os.urandom(length)
len_charset = len(charset)
indices = [int(len_charset * (byte / 256.0)) for byte in random_bytes]