diff options
author | Alexander Piskun <bigcat88@icloud.com> | 2023-10-06 13:46:37 +0300 |
---|---|---|
committer | Andrey Borysenko <andrey18106x@gmail.com> | 2023-10-09 14:44:34 +0300 |
commit | 4623fd12d329bd346f624335e9fb0e99374b974e (patch) | |
tree | ffe731f32e5dd23346676a9958459dfce60924d4 /lib | |
parent | 2fb703dfdac399972305c7180f2940d1aaf15b9f (diff) | |
download | nextcloud-server-4623fd12d329bd346f624335e9fb0e99374b974e.tar.gz nextcloud-server-4623fd12d329bd346f624335e9fb0e99374b974e.zip |
fixed Drone test
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/AppFramework/Middleware/Security/CORSMiddleware.php | 3 |
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 36fb5a29e3c..9940eb9577c 100644 --- a/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php @@ -39,6 +39,7 @@ use OCP\AppFramework\Http\JSONResponse; use OCP\AppFramework\Http\Response; use OCP\AppFramework\Middleware; use OCP\IRequest; +use OCP\ISession; use ReflectionMethod; /** @@ -98,7 +99,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(); |