Skip to content

Commit 96c1cf8

Browse files
authored
[CF1] Authenticated DoH -- Remove clear-text logging (#25457)
* [CF1] Authenticated DoH -- Remove clear-text logging Fixes a few issues raised by code scanning * Update public/cloudflare-one/static/authenticated-doh.py
1 parent 1c502d1 commit 96c1cf8

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ 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+
print(f"Issuing request for {team_name}, {account_tag}, and {user_id}.")
7373
response = json.loads(subprocess.check_output(command))
7474
if verbose:
7575
print("Got response:")
@@ -94,7 +94,7 @@ def request(method, url, body):
9494
command.append('--data')
9595
command.append(json.dumps(body))
9696
if verbose:
97-
print(f"Issuing request {' '.join(command)}")
97+
print(f"Issuing request for {method} and {url}")
9898
response = json.loads(subprocess.check_output(command))
9999
if 'errors' in response and len(response['errors']) > 0:
100100
pprint(response)
@@ -145,9 +145,7 @@ def request(method, url, body):
145145
if client_id == "new":
146146
service_token_name = input('Please input name for service token > ')
147147
client_id, client_secret = request_create_service_token(service_token_name)
148-
print(
149-
f"Created service token with client_id {client_id} and client_secret {client_secret}. You may want to save these secrets.")
150-
148+
print(f"Created service token with client_id {client_id} and client_secret {client_secret}. You may want to save these secrets.")
151149

152150
if len(client_secret) == 0:
153151
client_secret = read_string_option('CLIENT_SECRET', "client secret")

0 commit comments

Comments
 (0)