Commit 09e3def5 authored by Romain Courteaud's avatar Romain Courteaud

slapos.recipe.random: use more characters to generate password

parent 910d0862
...@@ -107,7 +107,8 @@ class Mac(object): ...@@ -107,7 +107,8 @@ class Mac(object):
pass pass
def generatePassword(length): def generatePassword(length):
return ''.join(random.SystemRandom().sample(string.ascii_lowercase, length)) return ''.join(random.SystemRandom().sample(
string.ascii_letters + string.digits, length))
class Password(object): class Password(object):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment