diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2013-10-31 00:12:16 +0400 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2013-10-31 00:12:16 +0400 |
commit | c1730d241c52b5e5c1719b6086d05cb30783e665 (patch) | |
tree | d17093d4fc3a04ffb06f717e99d90a7a056f51e4 /lib | |
parent | 257084444b062758ac9f56eb9eb0845d62fe6e9c (diff) | |
parent | cba12e009fd11591763198665e5845cc54f395da (diff) |
Merge pull request #5615 from owncloud/fixing-5614-master
http header OCS-ApiRequest: true is required in case of session based OC...
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..7e69a6a77d2 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['HTTP_OCS_APIREQUEST']) ? $_SERVER['HTTP_OCS_APIREQUEST'] === 'true' : false; + if ($loggedIn === true && $ocsApiRequest) { return OC_User::getUser(); } |