summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-08-12 15:15:24 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2016-08-12 20:36:24 +0200
commitf6d7a62fbdd1b032372a6fea10c18bfd9e95be74 (patch)
treeafc81b9f9fe825f52df77b85ad77f93a71b7c009
parent11e089f112380b2c81bf1faa533ea6f626b40832 (diff)
downloadnextcloud-server-f6d7a62fbdd1b032372a6fea10c18bfd9e95be74.tar.gz
nextcloud-server-f6d7a62fbdd1b032372a6fea10c18bfd9e95be74.zip
Move OCS Middleware before security middleware
This is required to be able to catch the NotLoggedIn exceptions etc in the OCSMiddleware and convert them to proper OCS Responses.
-rw-r--r--lib/private/AppFramework/DependencyInjection/DIContainer.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/AppFramework/DependencyInjection/DIContainer.php b/lib/private/AppFramework/DependencyInjection/DIContainer.php
index 66ca59d26e2..b60ce643249 100644
--- a/lib/private/AppFramework/DependencyInjection/DIContainer.php
+++ b/lib/private/AppFramework/DependencyInjection/DIContainer.php
@@ -396,6 +396,7 @@ class DIContainer extends SimpleContainer implements IAppContainer {
$this->registerService('MiddlewareDispatcher', function($c) use (&$middleWares) {
$dispatcher = new MiddlewareDispatcher();
$dispatcher->registerMiddleware($c['CORSMiddleware']);
+ $dispatcher->registerMiddleware($c['OCSMiddleware']);
$dispatcher->registerMiddleware($c['SecurityMiddleware']);
$dispatcher->registerMiddleWare($c['TwoFactorMiddleware']);
@@ -404,7 +405,6 @@ class DIContainer extends SimpleContainer implements IAppContainer {
}
$dispatcher->registerMiddleware($c['SessionMiddleware']);
- $dispatcher->registerMiddleware($c['OCSMiddleware']);
return $dispatcher;
});