diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-01-20 11:45:08 +0100 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-01-20 11:45:08 +0100 |
commit | f5c361cf44739058b79f322576a1bad2d8c142d9 (patch) | |
tree | a22217c6995751023112832d191d213e494e2fbc /lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php | |
parent | 37bb33c5799b834dfef3fb73936bd0e5a4773fb8 (diff) | |
download | nextcloud-server-f5c361cf44739058b79f322576a1bad2d8c142d9.tar.gz nextcloud-server-f5c361cf44739058b79f322576a1bad2d8c142d9.zip |
composer run cs:fix
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php')
-rw-r--r-- | lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php index e0f36231b68..eb8c1b8dc43 100644 --- a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php @@ -137,7 +137,6 @@ class SecurityMiddleware extends Middleware { * @suppress PhanUndeclaredClassConstant */ public function beforeController($controller, $methodName) { - // this will set the current navigation entry of the app, use this only // for normal HTML requests and not for AJAX requests $this->navigationManager->setActiveEntry($this->appName); @@ -207,11 +206,11 @@ class SecurityMiddleware extends Middleware { * This allows oauth apps (e.g. moodle) to use the OCS endpoints */ if (!$this->request->passesCSRFCheck() && !( - $controller instanceof OCSController && ( - $this->request->getHeader('OCS-APIREQUEST') === 'true' || - strpos($this->request->getHeader('Authorization'), 'Bearer ') === 0 - ) - )) { + $controller instanceof OCSController && ( + $this->request->getHeader('OCS-APIREQUEST') === 'true' || + strpos($this->request->getHeader('Authorization'), 'Bearer ') === 0 + ) + )) { throw new CrossSiteRequestForgeryException(); } } |