diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2017-07-26 09:03:04 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-07-31 16:54:19 +0200 |
commit | 3548603a88360f9577a386c3b9c2032230c48632 (patch) | |
tree | 04de57fb989fabc9216d918526b6d5b07176188d /lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php | |
parent | 72eb610b3d0c73e7dd79286c0719152688a5f915 (diff) | |
download | nextcloud-server-3548603a88360f9577a386c3b9c2032230c48632.tar.gz nextcloud-server-3548603a88360f9577a386c3b9c2032230c48632.zip |
Fix middleware implementations signatures
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php')
-rw-r--r-- | lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php index 4e41c946432..becbd7b9ca2 100644 --- a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php @@ -136,7 +136,7 @@ class SecurityMiddleware extends Middleware { * @param string $methodName the name of the method * @throws SecurityException when a security check fails */ - public function beforeController($controller, $methodName) { + public function beforeController(Controller $controller, $methodName) { // this will set the current navigation entry of the app, use this only // for normal HTML requests and not for AJAX requests @@ -205,7 +205,7 @@ class SecurityMiddleware extends Middleware { * @param Response $response * @return Response */ - public function afterController($controller, $methodName, Response $response) { + public function afterController(Controller $controller, $methodName, Response $response) { $policy = !is_null($response->getContentSecurityPolicy()) ? $response->getContentSecurityPolicy() : new ContentSecurityPolicy(); if (get_class($policy) === EmptyContentSecurityPolicy::class) { @@ -234,7 +234,7 @@ class SecurityMiddleware extends Middleware { * @throws \Exception the passed in exception if it can't handle it * @return Response a Response object or null in case that the exception could not be handled */ - public function afterException($controller, $methodName, \Exception $exception) { + public function afterException(Controller $controller, $methodName, \Exception $exception) { if($exception instanceof SecurityException) { if($exception instanceof StrictCookieMissingException) { return new RedirectResponse(\OC::$WEBROOT); |