You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
containsCredentials misses credentials in subsequent JSON values #2217
containsCredentials only checks the first JSON value in a response body. If a credential appears in a subsequent JSON value, it is not detected and the response may be printed in debug traces.
What did you expect to happen?
The entire response should be checked for credentials before being printed.
How can we reproduce it?
Pass the following response body to containsCredentials:
{"status":"ok"}{"access_token":"12345"}
containsCredentials returns false because it only decodes the first JSON value.
This causes logResponseBody to print the response body instead of redacting it, exposing the access_token in the debug trace
Activity