Fixed positive list

This commit is contained in:
Michael 2024-02-24 13:56:12 +00:00
parent e05b57cd5d
commit 5800a973cb

View File

@ -22,8 +22,6 @@
namespace Friendica\Content; namespace Friendica\Content;
use DOMDocument; use DOMDocument;
use DOMNode;
use DOMText;
use DOMXPath; use DOMXPath;
use Exception; use Exception;
use Friendica\Core\Cache\Enum\Duration; use Friendica\Core\Cache\Enum\Duration;
@ -161,7 +159,7 @@ class OEmbed
return $oembed; return $oembed;
} }
if (!self::isAllowedURL($oembed->url) || ($oembed->type == 'error')) { if (!self::isAllowedURL($embedurl) || ($oembed->type == 'error')) {
$oembed->html = ''; $oembed->html = '';
$oembed->type = $data['type']; $oembed->type = $data['type'];
@ -332,14 +330,12 @@ class OEmbed
return false; return false;
} }
$str_allowed = DI::config()->get('system', 'allowed_oembed', ''); $allowed = DI::config()->get('system', 'allowed_oembed', '');
if (empty($str_allowed)) { if (empty($allowed)) {
return false; return false;
} }
$allowed = explode(',', $str_allowed); return Network::isDomainMatch($domain, explode(',', $allowed));
return Network::isDomainMatch($domain, $allowed);
} }
/** /**