Merge pull request #29108 from lorengordon/type-enforce-length

Enforce length as an int, fixes #29107
This commit is contained in:
Thomas S Hatch 2015-11-23 12:06:52 -07:00
commit 17638c734b

View File

@ -32,6 +32,7 @@ def secure_password(length=20):
'''
Generate a secure password.
'''
length = int(length)
pw = ''
while len(pw) < length:
if HAS_RANDOM: