Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions models/api-key.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ const isValidApiSecret = (apiKeyRecord, apiSecret = '') => {
const isValid = password.compare(apiSecret, apiKeyRecord.hashedApiSecret);
if (isValid !== true) {
console.log('The given API Secret is NOT valid for the given API Key record.');
const redactedApiSecret = apiSecret.substring(0, 3) + '...[snip]...' + apiSecret.substring(apiSecret.length - 3);
console.log(redactedApiSecret);
Comment on lines +185 to +186
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.

return false;
}

Expand Down