diff options
author | Joas Schilling <coding@schilljs.com> | 2025-04-25 14:49:19 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2025-04-25 14:49:19 +0200 |
commit | cdfce26ea925e22c203a91650f4b7f538295a091 (patch) | |
tree | 43f463bb1861f0d6813ad90fc8980ca2afb296ea | |
parent | 553870d30a045ce4364bde6b26ba71a9867f7dca (diff) | |
download | nextcloud-server-bugfix/52420/closure-as-default-app.tar.gz nextcloud-server-bugfix/52420/closure-as-default-app.zip |
fix(navigation): Fix absolute URLs from default appsbugfix/52420/closure-as-default-app
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | lib/private/URLGenerator.php | 5 |
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); } |