aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2025-04-25 14:49:19 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2025-04-28 14:54:35 +0000
commit919a46a8678de51a32433198fe3714f0d46e5351 (patch)
treede3ab08936f181d8d089d70d0760120ff6041c6a
parentcf4e7848183fe26445413d793805efe294a634da (diff)
downloadnextcloud-server-backport/52434/stable31.tar.gz
nextcloud-server-backport/52434/stable31.zip
fix(navigation): Fix absolute URLs from default appsbackport/52434/stable31
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--lib/private/URLGenerator.php5
1 files changed, 5 insertions, 0 deletions
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);
}