Skip to content

Commit

Permalink
Fix sensitive command check
Browse files Browse the repository at this point in the history
Check needs to be != -1 and not truthy
  • Loading branch information
Annoraaq committed Feb 1, 2017
1 parent ac4a1ef commit bd35309
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 bd35309

Please sign in to comment.