diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-03-26 14:26:07 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-03-26 14:26:07 +0100 |
commit | 371a924c92bb751b81e2a819d8c581743be7a797 (patch) | |
tree | f0b1ec313deb42850ca754c5894737dc2a0a8fb9 /lib/private/connector | |
parent | db6fb198fe7b8fa854050730b32d58d3787505b3 (diff) | |
parent | 028973cbea865075a32db6228b56b7d3960771d6 (diff) | |
download | nextcloud-server-371a924c92bb751b81e2a819d8c581743be7a797.tar.gz nextcloud-server-371a924c92bb751b81e2a819d8c581743be7a797.zip |
merge master into webdav-injection
Diffstat (limited to 'lib/private/connector')
-rw-r--r-- | lib/private/connector/sabre/auth.php | 16 |
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..5577273df8c 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 + \OC::$session->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); - } + } } |