aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework
diff options
context:
space:
mode:
authorAlexander Piskun <bigcat88@icloud.com>2023-10-06 13:46:37 +0300
committerAlexander Piskun <bigcat88@icloud.com>2023-10-06 13:46:37 +0300
commit0b8a3b578d9be62da1d002f10e190855bb21998e (patch)
treef48ff57a018044527bd35e4bb86678a3f7aaa2fc /lib/private/AppFramework
parentf16c9f42c65d784f5c394de4d19a6f58b525aaa3 (diff)
downloadnextcloud-server-0b8a3b578d9be62da1d002f10e190855bb21998e.tar.gz
nextcloud-server-0b8a3b578d9be62da1d002f10e190855bb21998e.zip
fixed Drone test
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
Diffstat (limited to 'lib/private/AppFramework')
-rw-r--r--lib/private/AppFramework/Middleware/Security/CORSMiddleware.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php b/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php
index 145b412104c..f0d6ece8a93 100644
--- a/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php
@@ -38,6 +38,7 @@ use OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\Http\Response;
use OCP\AppFramework\Middleware;
use OCP\IRequest;
+use OCP\ISession;
use OCP\Security\Bruteforce\IThrottler;
use ReflectionMethod;
@@ -92,7 +93,7 @@ class CORSMiddleware extends Middleware {
return;
}
// Skip CORS check for requests with AppAPI auth.
- if ($this->session->getSession()->get('app_api') === true) {
+ if ($this->session->getSession() instanceof ISession && $this->session->getSession()->get('app_api') === true) {
return;
}
$this->session->logout();