mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
PHRAS-4038 fix token in form (#4484)
This commit is contained in:
@@ -116,10 +116,12 @@ class Controller
|
||||
|
||||
public function setSessionFormToken($formName)
|
||||
{
|
||||
$randomValue = bin2hex(random_bytes(35));
|
||||
$this->app['session']->set($formName.'_token', $randomValue);
|
||||
if (!$this->app['session']->has($formName.'_token')) {
|
||||
$randomValue = bin2hex(random_bytes(35));
|
||||
$this->app['session']->set($formName.'_token', $randomValue);
|
||||
|
||||
return $randomValue;
|
||||
return $randomValue;
|
||||
}
|
||||
}
|
||||
|
||||
public function getSessionFormToken($formName)
|
||||
|
Reference in New Issue
Block a user