From 8b220b923af54b1e4efda9d28e4dce4e60080073 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sun, 5 Dec 2010 00:18:48 +0000 Subject: [PATCH] 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 --- forms/Form.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/forms/Form.php b/forms/Form.php index 05ff72154..40cd03f9d 100755 --- a/forms/Form.php +++ b/forms/Form.php @@ -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); }