diff --git a/public/cloudflare-one/static/authenticated-doh.py b/public/cloudflare-one/static/authenticated-doh.py index 83ea1b0b8a68b54..ba44cb10dfa7bd6 100644 --- a/public/cloudflare-one/static/authenticated-doh.py +++ b/public/cloudflare-one/static/authenticated-doh.py @@ -9,6 +9,7 @@ verbose = os.environ.get('VERBOSE', False) + def check_for_command(command): try: subprocess.check_output(["command", "-v", command]) @@ -69,7 +70,8 @@ def request_doh_token(account_tag, user_id, client_id, client_secret): '-H', f"Cf-Access-Client-Id: {client_id}", '-H', f"Cf-Access-Client-Secret: {client_secret}"] if verbose: - print(f"Issuing request {' '.join(command)}") + sanitized_command = sanitize_command(command) + print(f"Issuing request {' '.join(sanitized_command)}") response = json.loads(subprocess.check_output(command)) if verbose: print("Got response:")