Fix allowed_email()

- Reworked allowed_domain
- Added more variable checks to allowed_email() and
OEmbed::isAllowedURL()
This commit is contained in:
Hypolite Petovan 2018-01-07 19:10:09 -05:00
parent 6496a721ea
commit 4a20bcd6f0
3 changed files with 25 additions and 20 deletions

View file

@ -299,11 +299,18 @@ class OEmbed
}
$domain = parse_url($url, PHP_URL_HOST);
if (!x($domain)) {
return false;
}
$str_allowed = Config::get('system', 'allowed_oembed', '');
if (!x($str_allowed)) {
return false;
}
$allowed = explode(',', $str_allowed);
return allowed_domain($domain, $allowed, true);
return allowed_domain($domain, $allowed);
}
public static function getHTML($url, $title = null)