File: lib/db/sql/session.php
function read($id) {
$this->load(['session_id=?',$this->sid=$id]);
if ($this->dry()) return '';
/* *** commented out ***
if ($this->get('ip')!=$this->_ip || $this->get('agent')!=$this->_agent) {
$fw=\Base::instance();
if (!isset($this->onsuspect) || $fw->call($this->onsuspect,[$this,$id])===FALSE) {
//NB: `session_destroy` can't be called at that stage (`session_start` not completed)
$this->destroy($id);
$this->close();
$fw->clear('COOKIE.'.session_name());
$fw->error(403);
}
}
*** end commented out *** */
return $this->get('data');
}
the code that checks if the IP or AGENT has changed destroys the current sesssion, removes the record from the db, and stops execution with a 403.
If you ignore IP / AGENT changes, by commenting out the code which checks this, then the problem does not arise.
this was done just to isolate where in the code the issue occurs.
I think the correct way to fix this would be to destroy the session, and then create a new one, without stopping execution.
On Thursday, August 31, 2017 at 7:00:30 PM UTC+2, ved wrote: