summaryrefslogtreecommitdiffstats
path: root/lib/private/appframework/dependencyinjection/dicontainer.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-06-23 13:37:50 +0200
committerLukas Reschke <lukas@owncloud.com>2015-06-23 13:37:50 +0200
commit063b8ea31da7dfb8a9491d914ea0c7d2de11bd2d (patch)
tree13e45f7068aca25cd4c1cc78195d41c8b4859df6 /lib/private/appframework/dependencyinjection/dicontainer.php
parent6fdd1d094f3a55718b75568711a36969040949be (diff)
parent6b4f1706b906e22d48efca4c3b65aa0d767141ae (diff)
downloadnextcloud-server-063b8ea31da7dfb8a9491d914ea0c7d2de11bd2d.tar.gz
nextcloud-server-063b8ea31da7dfb8a9491d914ea0c7d2de11bd2d.zip
Merge pull request #16581 from owncloud/stable7-cors-no-cookie-auth
Disallow cookie auth for cors requests stable7
Diffstat (limited to 'lib/private/appframework/dependencyinjection/dicontainer.php')
-rw-r--r--lib/private/appframework/dependencyinjection/dicontainer.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/private/appframework/dependencyinjection/dicontainer.php b/lib/private/appframework/dependencyinjection/dicontainer.php
index 61a2333ecee..74b0a98f09f 100644
--- a/lib/private/appframework/dependencyinjection/dicontainer.php
+++ b/lib/private/appframework/dependencyinjection/dicontainer.php
@@ -108,18 +108,19 @@ class DIContainer extends SimpleContainer implements IAppContainer{
);
});
- $this['CORSMiddleware'] = $this->share(function($c) {
+ $this['CORSMiddleware'] = $this->share(function($c) use ($app){
return new CORSMiddleware(
$c['Request'],
- $c['ControllerMethodReflector']
+ $c['ControllerMethodReflector'],
+ $app->getServer()->getUserSession()
);
});
$middleWares = &$this->middleWares;
$this['MiddlewareDispatcher'] = $this->share(function($c) use (&$middleWares) {
$dispatcher = new MiddlewareDispatcher();
- $dispatcher->registerMiddleware($c['SecurityMiddleware']);
$dispatcher->registerMiddleware($c['CORSMiddleware']);
+ $dispatcher->registerMiddleware($c['SecurityMiddleware']);
foreach($middleWares as $middleWare) {
$dispatcher->registerMiddleware($c[$middleWare]);