mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENHANCEMENT Using RandomGenerator in Form->getExtraFields() "SecurityID" token creation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114498 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
c378448f19
commit
8b220b923a
@ -441,7 +441,8 @@ class Form extends RequestHandler {
|
|||||||
if(Session::get('SecurityID')) {
|
if(Session::get('SecurityID')) {
|
||||||
$securityID = Session::get('SecurityID');
|
$securityID = Session::get('SecurityID');
|
||||||
} else {
|
} else {
|
||||||
$securityID = rand();
|
$generator = new RandomGenerator();
|
||||||
|
$securityID = $generator->generateHash('sha1');
|
||||||
Session::set('SecurityID', $securityID);
|
Session::set('SecurityID', $securityID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user