From 8483ec8f904b838cfb1bd8f68a3ba9b7802ac167 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Fri, 5 Jul 2019 15:23:16 +0200 Subject: [PATCH] fix: [role_manager] add password characters --- var/www/modules/Role_Manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/www/modules/Role_Manager.py b/var/www/modules/Role_Manager.py index dbef9bd8..dc4e7ce1 100644 --- a/var/www/modules/Role_Manager.py +++ b/var/www/modules/Role_Manager.py @@ -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]