diff --git a/includes/functions.php b/includes/functions.php index cfa205ea026323b3b3a9c009a1a4be408a35da61..89e68c7edae3230a98a950f793047ef73191e303 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -87,7 +87,12 @@ function validate_command( $command ) { * @return bool */ function is_command_allowed( $command ) { - return ! in_array( $command, get_command_blacklist(), true ) && in_array( $command, get_command_whitelist(), true ); + // Command explicitly disallowed. + if ( in_array( $command, get_command_blacklist(), true ) ) { + return false; + } + + return in_array( $command, get_command_whitelist(), true ); } /**