- upgraded "Fat Free Framework" PHP core framework v3.6.4 → v3.6.5
This commit is contained in:
@@ -182,7 +182,11 @@ class Session {
|
||||
register_shutdown_function('session_commit');
|
||||
$fw=\Base::instance();
|
||||
$headers=$fw->HEADERS;
|
||||
$this->_csrf=$fw->SEED.'.'.$fw->hash(mt_rand());
|
||||
$this->_csrf=$fw->hash($fw->SEED.
|
||||
extension_loaded('openssl')?
|
||||
implode(unpack('L',openssl_random_pseudo_bytes(4))):
|
||||
mt_rand()
|
||||
);
|
||||
if ($key)
|
||||
$fw->$key=$this->_csrf;
|
||||
$this->_agent=isset($headers['User-Agent'])?$headers['User-Agent']:'';
|
||||
|
||||
Reference in New Issue
Block a user