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
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2014-10-01 12:42:20 +0400
committerLukas Reschke <lukas@owncloud.com>2014-10-01 12:42:20 +0400
commitd9ceeed60d8a5d38873dabbd4488247d90efd8a6 (patch)
tree5d3dd50ebc4e4e475ef8f660b9dd3d2c930a8769
parentb35854769982d830e9ea35b5fa3b065d364b7916 (diff)
parent7217fb873ca309b6305f9f9d59f8f98175bca9a3 (diff)
Merge pull request #11153 from owncloud/parallel-upload-stable6
close the session for all DAV calls right after authentication - no need...
-rw-r--r--lib/private/connector/sabre/auth.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/private/connector/sabre/auth.php b/lib/private/connector/sabre/auth.php
index 0c84fa6b757..685932850aa 100644
--- a/lib/private/connector/sabre/auth.php
+++ b/lib/private/connector/sabre/auth.php
@@ -73,6 +73,20 @@ class OC_Connector_Sabre_Auth extends Sabre_DAV_Auth_Backend_AbstractBasic {
*/
public function authenticate(Sabre_DAV_Server $server, $realm) {
+ $result = $this->auth($server, $realm);
+
+ // close the session - right after authentication there is not need to write to the session any more
+ session_write_close();
+
+ return $result;
+ }
+
+ /**
+ * @param Sabre_DAV_Server $server
+ * @param $realm
+ * @return bool
+ */
+ private function auth(Sabre_DAV_Server $server, $realm) {
if (OC_User::handleApacheAuth() || OC_User::isLoggedIn()) {
$user = OC_User::getUser();
OC_Util::setupFS($user);
@@ -81,5 +95,5 @@ class OC_Connector_Sabre_Auth extends Sabre_DAV_Auth_Backend_AbstractBasic {
}
return parent::authenticate($server, $realm);
- }
+ }
}