From 5c718b13b8c68fc89661edbdbd40822bb55f544a Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Mon, 1 Aug 2016 08:52:50 +0200 Subject: We should properly check for 'true' instaed of the bool --- lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php index 08af42b5216..3bfef2df025 100644 --- a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php @@ -153,7 +153,7 @@ class SecurityMiddleware extends Middleware { */ if(!$this->request->passesCSRFCheck() && !( $controller instanceof OCSController && - $this->request->getHeader('OCS_APIREQUEST') === true)) { + $this->request->getHeader('OCS-APIREQUEST') === 'true')) { throw new CrossSiteRequestForgeryException(); } } -- cgit v1.2.3