summaryrefslogtreecommitdiffstats
path: root/lib/private/Setup.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Setup.php')
-rw-r--r--lib/private/Setup.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/private/Setup.php b/lib/private/Setup.php
index d5ccde6bba3..9f5403b8318 100644
--- a/lib/private/Setup.php
+++ b/lib/private/Setup.php
@@ -445,11 +445,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 : '/';
}