Revert "Everything IP!"

This reverts commit 23f608e173.
This commit is contained in:
Astrologies 2021-12-31 14:31:26 -05:00
parent eb417b791d
commit f282e03653
3 changed files with 1 additions and 7 deletions

View File

@ -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;

View File

@ -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()

View File

@ -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();