diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-30 02:07:27 +0400 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-30 02:07:27 +0400 |
commit | 3d42e402c5f1956bc72ac5accc268f519d66c3e9 (patch) | |
tree | c2a033c6e28c10e26c144dfacac334fe19c4afab /lib | |
parent | de57e36b6b6ad7b947bb601f0824902401ec4fbe (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.php | 3 |
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(); } |