1
0
mirror of https://github.com/silverstripe/silverstripe-framework synced 2024-10-22 14:05:37 +02:00

FIX: Session::restart() didn't correctly restart session (fixes )

This commit is contained in:
Loz Calver 2019-11-20 14:21:30 +00:00
parent bd658ca745
commit 453945da14

View File

@ -226,9 +226,7 @@ class Session
if (isset($this->data['HTTP_USER_AGENT'])) {
if ($this->data['HTTP_USER_AGENT'] !== $this->userAgent($request)) {
$this->clearAll();
$this->destroy();
$this->started = false;
$this->start($request);
$this->restart($request);
}
}
}
@ -241,7 +239,7 @@ class Session
public function restart(HTTPRequest $request)
{
$this->destroy();
$this->init($request);
$this->start($request);
}
/**
@ -369,6 +367,7 @@ class Session
// http://nz1.php.net/manual/en/function.session-destroy.php
unset($_SESSION);
$this->data = null;
$this->started = false;
}
/**