From 696de5d4377c2e1f7f885c1eb33fb50a7bc948cb Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sun, 5 Dec 2010 00:21:53 +0000 Subject: [PATCH] BUGFIX Using RandomGenerator class in SecurityToken->generate() for more random tokens git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@114500 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- security/SecurityToken.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/security/SecurityToken.php b/security/SecurityToken.php index 96035ab5f..964c47de4 100644 --- a/security/SecurityToken.php +++ b/security/SecurityToken.php @@ -200,10 +200,13 @@ class SecurityToken extends Object { } /** + * @uses RandomGenerator + * * @return String */ protected function generate() { - return rand(); + $generator = new RandomGenerator(); + return $generator->generateHash('sha1'); } }