diff --git a/globals/Dependencies/Web/IpRange.php b/globals/Dependencies/Web/IpRange.php index 1b75d4a..9d04ec0 100644 --- a/globals/Dependencies/Web/IpRange.php +++ b/globals/Dependencies/Web/IpRange.php @@ -182,9 +182,6 @@ namespace Alphaland\Web { */ public static function IsIpInCidrRange(string $ip, string $cidr) { - if (strpos($cidr, '/') === false) - $cidr = "$cidr/32"; - list($subnet, $bits) = explode('/', $cidr); if ($bits === null) { $bits = 32; diff --git a/globals/Dependencies/Web/WebContextManager.php b/globals/Dependencies/Web/WebContextManager.php index ca6f0e0..1d23d5a 100644 --- a/globals/Dependencies/Web/WebContextManager.php +++ b/globals/Dependencies/Web/WebContextManager.php @@ -3,7 +3,6 @@ namespace Alphaland\Web { use PDO; - use Alphaland\Web\IpHelper; class WebContextManager { @@ -17,7 +16,7 @@ namespace Alphaland\Web { $currentIp = WebContextManager::GetCurrentIPAddress(); $ipWhitelist = explode(";", $GLOBALS['ws']->webservice_whitelist); - return IpHelper::IsIpInCidrNetmaskOrRangeList($currentIp, $ipWhitelist); + return in_array($currentIp, $ipWhitelist); } public static function CanBypassMaintenance() diff --git a/globals/config.php b/globals/config.php index 3b1183e..ab6124c 100644 --- a/globals/config.php +++ b/globals/config.php @@ -126,8 +126,6 @@ try include "C:/Webserver/nginx/Alphaland/globals/Dependencies/Economy/EconomyHelper.php"; include "C:/Webserver/nginx/Alphaland/globals/Dependencies/Groups/Group.php"; include "C:/Webserver/nginx/Alphaland/globals/Dependencies/Web/WebsiteSettings.php"; - include "C:/Webserver/nginx/Alphaland/globals/Dependencies/Web/IpRange.php"; - include "C:/Webserver/nginx/Alphaland/globals/Dependencies/Client/ClientSettings.php"; //authenticator $authenticator = new PHPGangsta_GoogleAuthenticator();