From cf0b839944213338b0e3fab7f198fc3fe48fded3 Mon Sep 17 00:00:00 2001 From: Fokke Dijkstra Date: Mon, 30 Aug 2021 14:05:28 +0200 Subject: [PATCH 1/2] The ; in passwords can break command-line usage, like for example in the pulp playbooks. --- generate_secrets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate_secrets.py b/generate_secrets.py index 3accfb7f7..9cec4a501 100755 --- a/generate_secrets.py +++ b/generate_secrets.py @@ -46,7 +46,7 @@ def write_secrets(template_file, secrets_file): if key == 'cloud_console_pass': pass_length = 12 data[key] = ''.join( - random.choice(string.ascii_letters + string.digits + '!?@%[]^_+-{}=~.,;:/') + random.choice(string.ascii_letters + string.digits + '!?@%[]^_+-{}=~.,:/') for _ in range(pass_length)) else: print('INFO: preserving existing value "' + data[key] + '" for key "' + key + '".') From 26a7f608510e65d9e8e0a13639b270099585a4b7 Mon Sep 17 00:00:00 2001 From: Fokke Dijkstra Date: Mon, 30 Aug 2021 14:29:28 +0200 Subject: [PATCH 2/2] The - sign also gives issues on the command line, when it appears at the start of the passphrase. --- generate_secrets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate_secrets.py b/generate_secrets.py index 9cec4a501..d72a630c9 100755 --- a/generate_secrets.py +++ b/generate_secrets.py @@ -46,7 +46,7 @@ def write_secrets(template_file, secrets_file): if key == 'cloud_console_pass': pass_length = 12 data[key] = ''.join( - random.choice(string.ascii_letters + string.digits + '!?@%[]^_+-{}=~.,:/') + random.choice(string.ascii_letters + string.digits + '!?@%[]^_+{}=~.,:/') for _ in range(pass_length)) else: print('INFO: preserving existing value "' + data[key] + '" for key "' + key + '".')