Merge pull request #21577 from owncloud/make-code-cleaner-by-removing-unrequired-security-features

Remove code related to session regeneration after some time
This commit is contained in:
Morris Jobke 2016-01-10 11:38:35 +01:00
commit 53c4a55275

View file

@ -431,20 +431,10 @@ class OC {
//show the user a detailed error page
OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
OC_Template::printExceptionErrorPage($e);
die();
}
$sessionLifeTime = self::getSessionLifeTime();
// regenerate session id periodically to avoid session fixation
/**
* @var \OCP\ISession $session
*/
$session = self::$server->getSession();
if (!$session->exists('SID_CREATED')) {
$session->set('SID_CREATED', time());
} else if (time() - $session->get('SID_CREATED') > $sessionLifeTime / 2) {
$session->regenerateId();
$session->set('SID_CREATED', time());
}
// session timeout
if ($session->exists('LAST_ACTIVITY') && (time() - $session->get('LAST_ACTIVITY') > $sessionLifeTime)) {