mirror of
https://github.com/xcat2/confluent.git
synced 2025-01-28 11:57:37 +00:00
Fix incorrect length of random strings
This commit is contained in:
parent
7a2b295945
commit
bddbc37e8e
@ -79,7 +79,7 @@ def randomstring(length=20):
|
||||
if length % 4 > 0:
|
||||
chunksize += 1
|
||||
strval = base64.urlsafe_b64encode(os.urandom(chunksize * 3))
|
||||
return stringify(strval[0:length-1])
|
||||
return stringify(strval[0:length])
|
||||
|
||||
|
||||
def securerandomnumber(low=0, high=4294967295):
|
||||
|
Loading…
x
Reference in New Issue
Block a user