mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 18:21:40 -04:00
Merge pull request #11772 from nextcloud/stable14-pretty-urls-dont-work
[14] Allow overwrite.cli.url without trailing slash
This commit is contained in:
commit
2885db8e9b
1 changed files with 4 additions and 5 deletions
|
|
@ -438,16 +438,15 @@ class Setup {
|
|||
$config = \OC::$server->getSystemConfig();
|
||||
|
||||
// For CLI read the value from overwrite.cli.url
|
||||
if(\OC::$CLI) {
|
||||
if (\OC::$CLI) {
|
||||
$webRoot = $config->getValue('overwrite.cli.url', '');
|
||||
if($webRoot === '') {
|
||||
if ($webRoot === '') {
|
||||
return false;
|
||||
}
|
||||
$webRoot = parse_url($webRoot, PHP_URL_PATH);
|
||||
if ($webRoot === null) {
|
||||
if (!filter_var($webRoot, FILTER_VALIDATE_URL)) {
|
||||
return false;
|
||||
}
|
||||
$webRoot = rtrim($webRoot, '/');
|
||||
$webRoot = rtrim(parse_url($webRoot, PHP_URL_PATH), '/');
|
||||
} else {
|
||||
$webRoot = !empty(\OC::$WEBROOT) ? \OC::$WEBROOT : '/';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue