|
@@ 181-185 (lines=5) @@
|
| 178 |
|
} |
| 179 |
|
|
| 180 |
|
$blocklist = self::getConcatenateBlocklist(); |
| 181 |
|
if (substr_count($blocklist, self::SEPERATOR . $rootDomain . self::SEPERATOR)) { |
| 182 |
|
self::$reason = "Blocking because " . $entity . " root domain (" . $rootDomain . ") is found on blocklist"; |
| 183 |
|
|
| 184 |
|
return true; |
| 185 |
|
} |
| 186 |
|
|
| 187 |
|
$hostname = Domainparser::getHostname($url); |
| 188 |
|
if (substr_count($blocklist, self::SEPERATOR . $hostname . self::SEPERATOR)) { |
|
@@ 188-192 (lines=5) @@
|
| 185 |
|
} |
| 186 |
|
|
| 187 |
|
$hostname = Domainparser::getHostname($url); |
| 188 |
|
if (substr_count($blocklist, self::SEPERATOR . $hostname . self::SEPERATOR)) { |
| 189 |
|
self::$reason = "Blocking because " . $entity . " hostname (" . $hostname . ") is found on blocklist"; |
| 190 |
|
|
| 191 |
|
return true; |
| 192 |
|
} |
| 193 |
|
|
| 194 |
|
$path = Domainparser::getPath($url); |
| 195 |
|
if (trim($path, '/')) { |
|
@@ 196-200 (lines=5) @@
|
| 193 |
|
|
| 194 |
|
$path = Domainparser::getPath($url); |
| 195 |
|
if (trim($path, '/')) { |
| 196 |
|
if (substr_count($blocklist, self::SEPERATOR . $rootDomain . $path . self::SEPERATOR)) { |
| 197 |
|
self::$reason = "Blocking because " . $entity . " root domain/path (" . $rootDomain . $path . ") is found on blocklist"; |
| 198 |
|
|
| 199 |
|
return true; |
| 200 |
|
} |
| 201 |
|
if (substr_count($blocklist, self::SEPERATOR . $hostname . $path . self::SEPERATOR)) { |
| 202 |
|
self::$reason = "Blocking because " . $entity . " hostname/path (" . $hostname . $path . ") is found on blocklist"; |
| 203 |
|
|
|
@@ 201-205 (lines=5) @@
|
| 198 |
|
|
| 199 |
|
return true; |
| 200 |
|
} |
| 201 |
|
if (substr_count($blocklist, self::SEPERATOR . $hostname . $path . self::SEPERATOR)) { |
| 202 |
|
self::$reason = "Blocking because " . $entity . " hostname/path (" . $hostname . $path . ") is found on blocklist"; |
| 203 |
|
|
| 204 |
|
return true; |
| 205 |
|
} |
| 206 |
|
} |
| 207 |
|
|
| 208 |
|
self::$reason = "Not blocking because " . $entity . " (" . $url . ") is not matched against blocklist"; |