From 5f8ba34413e900bd057c174815a03f0950373d15 Mon Sep 17 00:00:00 2001
From: Erick Hitter <git-contrib@ethitter.com>
Date: Mon, 11 Sep 2017 14:23:47 -0700
Subject: [PATCH] Fix logic error that blocked all commands

---
 includes/functions.php | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/includes/functions.php b/includes/functions.php
index cfa205e..89e68c7 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 );
 }
 
 /**
-- 
GitLab