summaryrefslogtreecommitdiffstats
path: root/lib/private/api.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2016-03-07 11:17:33 +0100
committerLukas Reschke <lukas@owncloud.com>2016-03-07 11:17:33 +0100
commit14f932f3c78dd3b0c94b973fc03199675e67a001 (patch)
tree520e34de87a77bf61e2e1b808866b4dedd7ca411 /lib/private/api.php
parentc07b731689de6fe754e108688ccf71342aad95ef (diff)
downloadnextcloud-server-14f932f3c78dd3b0c94b973fc03199675e67a001.tar.gz
nextcloud-server-14f932f3c78dd3b0c94b973fc03199675e67a001.zip
Add DAV authenticated also to other scopes
Fixes https://github.com/owncloud/core/issues/22893
Diffstat (limited to 'lib/private/api.php')
-rw-r--r--lib/private/api.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/private/api.php b/lib/private/api.php
index 87f2aa9b118..12a78f1424b 100644
--- a/lib/private/api.php
+++ b/lib/private/api.php
@@ -364,6 +364,18 @@ class OC_API {
\OC_Util::setUpFS(\OC_User::getUser());
self::$isLoggedIn = true;
+ /**
+ * Add DAV authenticated. This should in an ideal world not be
+ * necessary but the iOS App reads cookies from anywhere instead
+ * only the DAV endpoint.
+ * This makes sure that the cookies will be valid for the whole scope
+ * @see https://github.com/owncloud/core/issues/22893
+ */
+ \OC::$server->getSession()->set(
+ \OCA\DAV\Connector\Sabre\Auth::DAV_AUTHENTICATED,
+ \OC::$server->getUserSession()->getUser()->getUID()
+ );
+
return \OC_User::getUser();
}
}