Merge remote-tracking branch 'sec_fixes/random_password'

pull/1377/head
OzzieIsaacs 5 years ago
commit d61b7e48d7

@ -466,7 +466,7 @@ def reset_password(user_id):
def generate_random_password():
s = "abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%&*()?"
passlen = 8
return "".join(random.sample(s, passlen))
return "".join(s[c % len(s)] for c in os.urandom(passlen))
################################## External interface

Loading…
Cancel
Save