Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Commit

Permalink
fix: remove logging of potentially secret value (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
Flydiverny authored and Silas Boyd-Wickizer committed Jun 22, 2019
1 parent 66af903 commit 6063f79
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/backends/kv-backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ class KVBackend extends AbstractBackend {
try {
parsedValue = JSON.parse(value)
} catch (err) {
this._logger.warn(`Failed to JSON.parse '${value}':`, err)
this._logger.warn(`Failed to JSON.parse value for '${secretProperty.key}',` +
` please verify that your secret value is correctly formatted as JSON.` +
` To use plain text secret remove the 'property: ${secretProperty.property}'`)
return
}

if (!(secretProperty.property in parsedValue)) {
throw new Error(`Could not find property ${secretProperty.property} in secretProperty.key`)
throw new Error(`Could not find property ${secretProperty.property} in ${secretProperty.key}`)
}

return parsedValue[secretProperty.property]
Expand Down

0 comments on commit 6063f79

Please sign in to comment.