Skip to content

Commit 54e5c05

Browse files
Merge pull request #111 from krishnprakash/alert-autofix-1.2
Potential fix for code scanning alert no. 1: Clear-text logging of sensitive information
2 parents 07d0585 + 397faca commit 54e5c05

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: public/cloudflare-one/static/authenticated-doh.py

+2-1
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)