From e13f4816fb3be6a09a08e1ddadcebf440a895ebc Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 15 Jun 2020 10:47:57 +0200 Subject: [PATCH] allowing multiple ip ranges in checking function --- inc/core.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/inc/core.php b/inc/core.php index d1543e6..a603c37 100644 --- a/inc/core.php +++ b/inc/core.php @@ -595,6 +595,13 @@ function deleteHash($hash) * via https://gist.github.com/tott/7684443 */ function isIPInRange( $ip, $range ) { + if(strpos($range,',')!==false) + { + $ranges = explode(',',$range); + foreach($ranges as $range) + if(isIPInRange( $ip, $range )) return true; + return false; + } if ( strpos( $range, '/' ) == false ) { $range .= '/32';