close the session for all DAV calls right after authentication - no need to write to the session afterwards
This commit is contained in:
parent
58c216d0e8
commit
f0603a971d
1 changed files with 15 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue