Skip to content

Commit

Permalink
Merge pull request #1473 from Annoraaq/patch-1
Browse files Browse the repository at this point in the history
Fix sensitive command check
  • Loading branch information
christkv committed Feb 5, 2017
2 parents ac4a1ef + bd35309 commit e4f5999
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/apm.js
Expand Up @@ -181,7 +181,7 @@ var Instrumentation = function(core, options, callback) {
};

// Filter out any sensitive commands
if(senstiveCommands.indexOf(commandName.toLowerCase())) {
if(senstiveCommands.indexOf(commandName.toLowerCase()) != -1) {
command.commandObj = {};
command.commandObj[commandName] = true;
}
Expand All @@ -208,7 +208,7 @@ var Instrumentation = function(core, options, callback) {
command.failure = err || r.result.writeErrors || r.result;

// Filter out any sensitive commands
if(senstiveCommands.indexOf(commandName.toLowerCase())) {
if(senstiveCommands.indexOf(commandName.toLowerCase()) != -1) {
command.failure = {};
}

Expand Down

0 comments on commit e4f5999

Please sign in to comment.