Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If the API Secret is NOT valid, log its first and last few characters #151

Merged
merged 1 commit into from
May 6, 2024

Conversation

forevermatt
Copy link
Contributor

Added

  • If the API Secret is NOT valid, log its first and last few characters
    • This should help us confirm whether, for instance, and equals sign has been dropped from the end of the string.

This should help us confirm whether, for instance, and equals sign has
been dropped from the end of the string.
@forevermatt forevermatt requested a review from a team May 6, 2024 20:07
Comment on lines +185 to +186
const redactedApiSecret = apiSecret.substring(0, 3) + '...[snip]...' + apiSecret.substring(apiSecret.length - 3);
console.log(redactedApiSecret);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ends up logging a message like this (which you can see during tests):
tTi...[snip]...4c=

Note that the specific value I pasted isn't used anywhere, it's just from my running make test locally in this repo.

Copy link

@jason-jackson jason-jackson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only danger would be if the api secret is short, approving for now, but may want to revisit later

@forevermatt forevermatt merged commit 5347736 into develop May 6, 2024
2 checks passed
@forevermatt forevermatt deleted the feature/log-redacted-apiSecret-if-incorrect branch May 6, 2024 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants