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:
Ingo Schommer 2010-12-05 00:18:48 +00:00
parent c378448f19
commit 8b220b923a

View File

@ -441,7 +441,8 @@ class Form extends RequestHandler {
if(Session::get('SecurityID')) {
$securityID = Session::get('SecurityID');
} else {
$securityID = rand();
$generator = new RandomGenerator();
$securityID = $generator->generateHash('sha1');
Session::set('SecurityID', $securityID);
}