From bddbc37e8ef46aefae99c7c96f8ccc720c920257 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 29 Oct 2020 10:57:49 -0400 Subject: [PATCH] Fix incorrect length of random strings --- confluent_server/confluent/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/confluent_server/confluent/util.py b/confluent_server/confluent/util.py index a44c5b96..2eeff5d4 100644 --- a/confluent_server/confluent/util.py +++ b/confluent_server/confluent/util.py @@ -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):