I found problem with restarting session after session ID was regenerated.
This is because \Nette\Http\Session::start() takes session ID always from request cookie. Invocation of \Nette\Http\Session::regenerateId() changes session ID. Closing session and starting session again changes session ID to value which is stored in cookie, but this session ID is already deleted.
Steps To Reproduce
$session = newSession();
$session->start(); // Session ID is taken from cookie.$session->regenerateId(); // Session ID is changed.$session->close(); // Session with old ID is deleted, session with new ID is written.$session->start(); // Session ID is taken from cookie - PROBLEM // it is old session ID, not the regenerated one and all session data are lost
The text was updated successfully, but these errors were encountered: