From c71825d3b00191b5b3a6e3fcf0349a645168c26b Mon Sep 17 00:00:00 2001 From: Loren Gordon Date: Sun, 22 Nov 2015 10:21:08 -0500 Subject: [PATCH] Enforce length as an int, fixes #29107 --- salt/utils/pycrypto.py | 1 + 1 file changed, 1 insertion(+) diff --git a/salt/utils/pycrypto.py b/salt/utils/pycrypto.py index 6e453f9528..72f081fa34 100644 --- a/salt/utils/pycrypto.py +++ b/salt/utils/pycrypto.py @@ -32,6 +32,7 @@ def secure_password(length=20): ''' Generate a secure password. ''' + length = int(length) pw = '' while len(pw) < length: if HAS_RANDOM: