diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2014-05-10 14:00:22 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-06-05 11:45:45 +0200 |
commit | ac7fb1b23e40e3075535ed5d4188219580b2386a (patch) | |
tree | a34585e85420dba68fb07456151b54e86ea4d785 /remote.php | |
parent | d0eb8f8668189d5fe82c9d783f30564d643ba604 (diff) | |
download | nextcloud-server-ac7fb1b23e40e3075535ed5d4188219580b2386a.tar.gz nextcloud-server-ac7fb1b23e40e3075535ed5d4188219580b2386a.zip |
Remove legacy routing code
The getfile routing code was absolutely legacy and not needed anymore. Additionally \OC::$REQUESTEDAPP was never set to the actually accessed application.
This commit removes the legacy routing code and ensures that $REQUESTEDAPP is always set so that other applications (e.g. the firewall or a two-factor authentication) can intercept the currently accessed app.
Testplan:
[x] Installation works
[x] Login with DB works
[x] Logout works
[x] Login with alternate backend works (tested with user_webdavauth)
[x] Other apps are accessible
[x] Redirect on login works (e.g. index.php?redirect_url=%2Fcore%2Findex.php%2Fsettings%2Fapps%3Finstalled)
[x] Personal settings are accessible
[x] Admin settings are accessible
[x] Sharing files works
[x] DAV works
[x] OC::$REQUESTEDAPP contains the requested application and can be intercepted by other applications
Diffstat (limited to 'remote.php')
-rw-r--r-- | remote.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/remote.php b/remote.php index 15dfa8256ff..6a069ed4605 100644 --- a/remote.php +++ b/remote.php @@ -1,7 +1,6 @@ <?php try { - require_once 'lib/base.php'; $path_info = OC_Request::getPathInfo(); if ($path_info === false || $path_info === '') { @@ -24,6 +23,11 @@ try { $parts=explode('/', $file, 2); $app=$parts[0]; + + // Load all required applications + \OC::$REQUESTEDAPP = $app; + OC_App::loadApps(array('authentication', 'filesystem', 'logging')); + switch ($app) { case 'core': $file = OC::$SERVERROOT .'/'. $file; |