Просмотр исходного кода

only check for blacklisted ip if not blank

CauseFX 4 лет назад
Родитель
Сommit
00a0f2b5c9
2 измененных файлов с 6 добавлено и 2 удалено
  1. 4 2
      api/classes/organizr.class.php
  2. 2 0
      api/functions/option-functions.php

+ 4 - 2
api/classes/organizr.class.php

@@ -186,8 +186,10 @@ class Organizr
 	{
 		if ($this->hasDB()) {
 			$currentIP = $this->userIP();
-			if (in_array($currentIP, $this->arrayIP($this->config['blacklisted']))) {
-				die($this->config['blacklistedMessage']);
+			if ($this->config['blacklisted'] !== '') {
+				if (in_array($currentIP, $this->arrayIP($this->config['blacklisted']))) {
+					die($this->config['blacklistedMessage']);
+				}
 			}
 		}
 	}

+ 2 - 0
api/functions/option-functions.php

@@ -13,6 +13,8 @@ trait OptionsFunction
 					'value' => $item
 				];
 			}
+		} elseif ($values == '') {
+			$formattedValues = '';
 		} else {
 			$formattedValues[] = [
 				'name' => $values,