|
@@ 193-197 (lines=5) @@
|
| 190 |
|
} |
| 191 |
|
|
| 192 |
|
$blocklist = self::getConcatenateBlocklist(); |
| 193 |
|
if (substr_count($blocklist, self::SEPERATOR . $rootDomain . self::SEPERATOR)) { |
| 194 |
|
self::$reason = 'Blocking because ' . $entity . ' root domain (' . $rootDomain . ') is found on blocklist'; |
| 195 |
|
|
| 196 |
|
return true; |
| 197 |
|
} |
| 198 |
|
|
| 199 |
|
$hostname = Domainparser::getHostname($url); |
| 200 |
|
if (substr_count($blocklist, self::SEPERATOR . $hostname . self::SEPERATOR)) { |
|
@@ 200-204 (lines=5) @@
|
| 197 |
|
} |
| 198 |
|
|
| 199 |
|
$hostname = Domainparser::getHostname($url); |
| 200 |
|
if (substr_count($blocklist, self::SEPERATOR . $hostname . self::SEPERATOR)) { |
| 201 |
|
self::$reason = 'Blocking because ' . $entity . ' hostname (' . $hostname . ') is found on blocklist'; |
| 202 |
|
|
| 203 |
|
return true; |
| 204 |
|
} |
| 205 |
|
|
| 206 |
|
$path = Domainparser::getPath($url); |
| 207 |
|
if (trim($path, '/')) { |
|
@@ 208-212 (lines=5) @@
|
| 205 |
|
|
| 206 |
|
$path = Domainparser::getPath($url); |
| 207 |
|
if (trim($path, '/')) { |
| 208 |
|
if (substr_count($blocklist, self::SEPERATOR . $rootDomain . $path . self::SEPERATOR)) { |
| 209 |
|
self::$reason = 'Blocking because ' . $entity . ' root domain/path (' . $rootDomain . $path . ') is found on blocklist'; |
| 210 |
|
|
| 211 |
|
return true; |
| 212 |
|
} |
| 213 |
|
if (substr_count($blocklist, self::SEPERATOR . $hostname . $path . self::SEPERATOR)) { |
| 214 |
|
self::$reason = 'Blocking because ' . $entity . ' hostname/path (' . $hostname . $path . ') is found on blocklist'; |
| 215 |
|
|
|
@@ 213-217 (lines=5) @@
|
| 210 |
|
|
| 211 |
|
return true; |
| 212 |
|
} |
| 213 |
|
if (substr_count($blocklist, self::SEPERATOR . $hostname . $path . self::SEPERATOR)) { |
| 214 |
|
self::$reason = 'Blocking because ' . $entity . ' hostname/path (' . $hostname . $path . ') is found on blocklist'; |
| 215 |
|
|
| 216 |
|
return true; |
| 217 |
|
} |
| 218 |
|
} |
| 219 |
|
|
| 220 |
|
self::$reason = 'Not blocking because ' . $entity . ' (' . $url . ') is not matched against blocklist'; |