Use more secure random number generation for CSRF auth tokens
* Also cleaned up pull request
This commit is contained in:
parent
be7cae4408
commit
73e5fb938f
2 changed files with 4 additions and 4 deletions
|
@ -156,7 +156,7 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
|
|||
|
||||
if (!$tokenValid) {
|
||||
$csrf_namespace = new Zend_Session_Namespace('csrf_namespace');
|
||||
$csrf_namespace->authtoken = sha1(uniqid(rand(),1));
|
||||
$csrf_namespace->authtoken = sha1(openssl_random_pseudo_bytes(128));
|
||||
|
||||
Logging::warn("Invalid CSRF token: $token");
|
||||
$this->getResponse()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue