From cdfce26ea925e22c203a91650f4b7f538295a091 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 25 Apr 2025 14:49:19 +0200 Subject: [PATCH] fix(navigation): Fix absolute URLs from default apps Signed-off-by: Joas Schilling --- lib/private/URLGenerator.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/private/URLGenerator.php b/lib/private/URLGenerator.php index ad12fae5144..c78ecac0903 100644 --- a/lib/private/URLGenerator.php +++ b/lib/private/URLGenerator.php @@ -304,6 +304,11 @@ class URLGenerator implements IURLGenerator { if ($href === '') { throw new \InvalidArgumentException('Default navigation entry is missing href: ' . $entryId); } + + if (str_starts_with($href, $this->getBaseUrl())) { + return $href; + } + if (str_starts_with($href, '/index.php/') && ($this->config->getSystemValueBool('htaccess.IgnoreFrontController', false) || getenv('front_controller_active') === 'true')) { $href = substr($href, 10); }