parent
eb417b791d
commit
f282e03653
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue