Skip to content

Commit

Permalink
Backport #11446
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
  • Loading branch information
kesselb committed Oct 11, 2018
1 parent 1f71412 commit 4f983b7
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/private/Setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -438,16 +438,15 @@ public static function updateHtaccess() {
$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 : '/';
}
Expand Down

0 comments on commit 4f983b7

Please sign in to comment.