From ac7fb1b23e40e3075535ed5d4188219580b2386a Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Sat, 10 May 2014 14:00:22 +0200 Subject: 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 --- public.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'public.php') diff --git a/public.php b/public.php index dfdd4c52af9..3b48e129d9a 100644 --- a/public.php +++ b/public.php @@ -24,6 +24,10 @@ try { $parts = explode('/', $file, 2); $app = $parts[0]; + // Load all required applications + \OC::$REQUESTEDAPP = $app; + OC_App::loadApps(array('authentication', 'filesystem', 'logging')); + OC_Util::checkAppEnabled($app); OC_App::loadApp($app); OC_User::setIncognitoMode(true); -- cgit v1.2.3