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