Skip to content

Commit 789bb76

Browse files
Potential fix for code scanning alert no. 1: Clear-text logging of sensitive information
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 6d63498 commit 789bb76

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

public/cloudflare-one/static/authenticated-doh.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ def request_doh_token(account_tag, user_id, client_id, client_secret):
6969
'-H', f"Cf-Access-Client-Id: {client_id}",
7070
'-H', f"Cf-Access-Client-Secret: {client_secret}"]
7171
if verbose:
72-
print(f"Issuing request {' '.join(command)}")
72+
sanitized_command = [part if "Cf-Access-Client-Secret" not in part else "Cf-Access-Client-Secret: [REDACTED]" for part in command]
73+
print(f"Issuing request {' '.join(sanitized_command)}")
7374
response = json.loads(subprocess.check_output(command))
7475
if verbose:
7576
print("Got response:")

0 commit comments

Comments
 (0)