Skip to content

Commit

Permalink
fix: Obfuscate BOTFUEL_APP_KEY in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Michel Blancard committed May 11, 2018
1 parent e0ec173 commit fd38026
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/botfuel-dialog/src/utils/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ const checkCredentials = (config) => {
if (!BOTFUEL_APP_KEY) {
logger.warn('Environment variable BOTFUEL_APP_KEY is not defined.');
} else {
logger.info(`BOTFUEL_APP_KEY=${BOTFUEL_APP_KEY}`);
const keyEndingChars = BOTFUEL_APP_KEY.slice(BOTFUEL_APP_KEY.length - 4);
const obfuscatedKey = `xxxx${keyEndingChars}`;
logger.info(`BOTFUEL_APP_KEY=${obfuscatedKey}`);
}
};

Expand Down

0 comments on commit fd38026

Please sign in to comment.