diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-06-23 13:37:50 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-06-23 13:37:50 +0200 |
commit | 063b8ea31da7dfb8a9491d914ea0c7d2de11bd2d (patch) | |
tree | 13e45f7068aca25cd4c1cc78195d41c8b4859df6 /lib/private/appframework/dependencyinjection/dicontainer.php | |
parent | 6fdd1d094f3a55718b75568711a36969040949be (diff) | |
parent | 6b4f1706b906e22d48efca4c3b65aa0d767141ae (diff) | |
download | nextcloud-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.php | 7 |
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]); |