From 636a201d19a6e95f8bfd28560a61c112cd248204 Mon Sep 17 00:00:00 2001 From: Shreya Date: Mon, 17 May 2021 22:48:01 +0530 Subject: [PATCH] Set default password length to 32 in `get_random_password()` --- monkey/infection_monkey/utils/random_password_generator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/monkey/infection_monkey/utils/random_password_generator.py b/monkey/infection_monkey/utils/random_password_generator.py index d205a9a01..273343c22 100644 --- a/monkey/infection_monkey/utils/random_password_generator.py +++ b/monkey/infection_monkey/utils/random_password_generator.py @@ -1,6 +1,8 @@ import secrets +SECRET_BYTE_LENGTH = 32 -def get_random_password(length: int = 12) -> str: + +def get_random_password(length: int = SECRET_BYTE_LENGTH) -> str: password = secrets.token_urlsafe(length) return password