From 8647a5d08a5a932b585dfbdea1fb8de887afbd28 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 29 Nov 2024 05:17:26 +0000 Subject: [PATCH] Added check for shortcut icon url parts --- src/Module/OpenSearch.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Module/OpenSearch.php b/src/Module/OpenSearch.php index 7ff64ecd67..7e97e52d3f 100644 --- a/src/Module/OpenSearch.php +++ b/src/Module/OpenSearch.php @@ -14,6 +14,7 @@ use Friendica\BaseModule; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\L10n; use Friendica\Util\BasePath; +use Friendica\Util\Network; use Friendica\Util\Profiler; use Friendica\Util\XML; use Psr\Log\LoggerInterface; @@ -68,11 +69,12 @@ class OpenSearch extends BaseModule } if (!empty($shortcut_icon)) { - $imagedata = getimagesize($this->baseUrl . $shortcut_icon); + $shortcut_icon = Network::addBasePath($shortcut_icon, $this->baseUrl); + $imagedata = getimagesize($shortcut_icon); } if (!empty($imagedata)) { - XML::addElement($xml, $parent, 'Image', $this->baseUrl . $shortcut_icon, [ + XML::addElement($xml, $parent, 'Image', $shortcut_icon, [ 'width' => $imagedata[0], 'height' => $imagedata[1], 'type' => $imagedata['mime'],