mirror of
https://github.com/manualdousuario/marreta.git
synced 2026-05-04 06:20:16 +00:00
add restrict urls
This commit is contained in:
parent
0a57629cff
commit
2071d5c2bc
7 changed files with 74 additions and 1 deletions
|
|
@ -55,6 +55,12 @@ class URLAnalyzer extends URLAnalyzerBase
|
|||
if (!$host) {
|
||||
$this->error->throwError(self::ERROR_INVALID_URL, '');
|
||||
}
|
||||
|
||||
// Check if URL contains restricted keywords
|
||||
if ($this->isRestrictedUrl($url)) {
|
||||
Logger::getInstance()->logUrl($url, 'RESTRICTED_URL');
|
||||
$this->error->throwError(self::ERROR_RESTRICTED_URL, '');
|
||||
}
|
||||
$originalHost = parse_url($url, PHP_URL_HOST);
|
||||
$host = preg_replace('/^www\./', '', $host);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue