Skip to content
Snippets Groups Projects
Commit 5f8ba344 authored by Erick Hitter's avatar Erick Hitter
Browse files

Fix logic error that blocked all commands

parent 3338de9b
No related merge requests found
......@@ -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 );
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment