Browse Source

Use raw PATH_INFO

PATH_INFO will be empty at this point and thus the logic in base.php did not catch this. Changing this to "getRawPathInfo" will ensure that the path info is properly read.

Fixes https://github.com/owncloud/core/issues/23199
tags/v9.1.0beta1
Lukas Reschke 8 years ago
parent
commit
24abe1e1e1
2 changed files with 3 additions and 3 deletions
  1. 2
    2
      .htaccess
  2. 1
    1
      lib/base.php

+ 2
- 2
.htaccess View File

@@ -62,8 +62,8 @@

# Rewrite rules for `front_controller_active`
Options -MultiViews
RewriteRule ^core/js/oc.js$ index.php/core/js/oc.js [PT,E=PATH_INFO:$1]
RewriteRule ^core/preview.png$ index.php/core/preview.png [PT,E=PATH_INFO:$1]
RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1]
RewriteRule ^core/preview.png$ index.php [PT,E=PATH_INFO:$1]
RewriteCond %{REQUEST_FILENAME} !\.(css|js|svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$
RewriteCond %{REQUEST_FILENAME} !core/img/favicon.ico$
RewriteCond %{REQUEST_FILENAME} !/remote.php

+ 1
- 1
lib/base.php View File

@@ -823,7 +823,7 @@ class OC {
}

$request = \OC::$server->getRequest();
$requestPath = $request->getPathInfo();
$requestPath = $request->getRawPathInfo();
if (substr($requestPath, -3) !== '.js') { // we need these files during the upgrade
self::checkMaintenanceMode();
self::checkUpgrade();

Loading…
Cancel
Save