Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-10-30 02:07:27 +0400
committerThomas Müller <thomas.mueller@tmit.eu>2013-10-30 02:07:27 +0400
commit3d42e402c5f1956bc72ac5accc268f519d66c3e9 (patch)
treec2a033c6e28c10e26c144dfacac334fe19c4afab /lib
parentde57e36b6b6ad7b947bb601f0824902401ec4fbe (diff)
http header OCS-ApiRequest: true is required in case of session based OCS API calls
Diffstat (limited to 'lib')
-rw-r--r--lib/private/api.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/api.php b/lib/private/api.php
index 26091657b31..0576f3e3f93 100644
--- a/lib/private/api.php
+++ b/lib/private/api.php
@@ -250,7 +250,8 @@ class OC_API {
// reuse existing login
$loggedIn = OC_User::isLoggedIn();
- if ($loggedIn === true) {
+ $ocsApiRequest = isset($_SERVER['OCS_APIREQUEST']) ? $_SERVER['OCS_APIREQUEST'] === 'true' : false;
+ if ($loggedIn === true && $ocsApiRequest) {
return OC_User::getUser();
}