Update WebfingerService, apply banned domains to webfinger logic

pull/5928/head
Daniel Supernault 7 months ago
parent 5f5ed1e62d
commit c1f2dfb013
No known key found for this signature in database
GPG Key ID: 23740873EE6F76A1

@ -11,10 +11,26 @@ class WebfingerService
{
public static function rawGet($url)
{
if (empty($url)) {
return false;
}
$n = WebfingerUrl::get($url);
if (! $n) {
return false;
}
if (empty($n) || ! str_starts_with($n, 'https://')) {
return false;
}
$host = parse_url($n, PHP_URL_HOST);
if (! $host) {
return false;
}
if (in_array($host, InstanceService::getBannedDomains())) {
return false;
}
$webfinger = FetchCacheService::getJson($n);
if (! $webfinger) {
return false;

Loading…
Cancel
Save