diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-10-02 23:39:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-02 23:39:30 +0200 |
commit | 8ede3f6346aaf96671878b320b82fd5542acef91 (patch) | |
tree | c0759b03e99e374bed3c8adb98c166ba5337d9c2 /lib/private/Setup.php | |
parent | e45248c17a796645c6de4399b6693405e5b19818 (diff) | |
parent | 9dae927b0c666f8db70732b0ac098b44ed913d92 (diff) | |
download | nextcloud-server-8ede3f6346aaf96671878b320b82fd5542acef91.tar.gz nextcloud-server-8ede3f6346aaf96671878b320b82fd5542acef91.zip |
Merge pull request #11446 from nextcloud/bugfix/10678/pretty-urls-dont-work
Allow overwrite.cli.url without trailing slash
Diffstat (limited to 'lib/private/Setup.php')
-rw-r--r-- | lib/private/Setup.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/private/Setup.php b/lib/private/Setup.php index e9719705fcd..7e235d03fdc 100644 --- a/lib/private/Setup.php +++ b/lib/private/Setup.php @@ -451,11 +451,10 @@ class Setup { if ($webRoot === '') { throw new InvalidArgumentException('overwrite.cli.url is empty'); } - $webRoot = parse_url($webRoot, PHP_URL_PATH); - if ($webRoot === null) { + if (!filter_var($webRoot, FILTER_VALIDATE_URL)) { throw new InvalidArgumentException('invalid value for overwrite.cli.url'); } - $webRoot = rtrim($webRoot, '/'); + $webRoot = rtrim(parse_url($webRoot, PHP_URL_PATH), '/'); } else { $webRoot = !empty(\OC::$WEBROOT) ? \OC::$WEBROOT : '/'; } |