- upgraded "Fat Free Framework" PHP core framework v3.6.4v3.6.5

This commit is contained in:
Mark Friedrich
2018-12-26 14:29:37 +01:00
parent 58db5962fb
commit e56740e8a0
22 changed files with 394 additions and 245 deletions

View File

@@ -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']:'';