File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
platform/services/installer/app/cli_utils Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,10 @@ def generate_password() -> str:
2222 Generate password. Security guide: 10 characters minimum, at least one capital letter,
2323 at least one numeral, and at least one special character
2424 """
25- lower = random . sample ( string .ascii_lowercase , 4 )
26- upper = random . sample ( string .ascii_uppercase , 4 )
27- numeral = random . sample ( string .digits , 4 )
28- symbols = random . sample ( ALLOWED_SPECIAL_CHARACTERS , 4 )
25+ lower = "" . join ( secrets . choice ( string .ascii_lowercase ) for _ in range ( 4 ) )
26+ upper = "" . join ( secrets . choice ( string .ascii_uppercase ) for _ in range ( 4 ) )
27+ numeral = "" . join ( secrets . choice ( string .digits ) for _ in range ( 4 ) )
28+ symbols = "" . join ( secrets . choice ( ALLOWED_SPECIAL_CHARACTERS ) for _ in range ( 4 ) )
2929 password = [* lower , * upper , * numeral , * symbols ]
3030 random .shuffle (password )
3131 return "" .join (password )
You can’t perform that action at this time.
0 commit comments