MINOR Using SecurityToken in ViewableData->getSecurityID() (from r113274)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114527 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-12-05 08:24:37 +00:00
parent 3f8a0ede40
commit c63b00f92a

View File

@ -699,12 +699,8 @@ class ViewableData extends Object implements IteratorAggregate {
* @return string * @return string
*/ */
public function getSecurityID() { public function getSecurityID() {
if(!$id = Session::get('SecurityID')) { $token = SecurityToken::inst();
$id = rand(); return $token->getValue();
Session::set('SecurityID', $id);
}
return $id;
} }
/** /**