[Form] fixed default CSRF token generation as a token must be tied to the user somewhat

This commit is contained in:
Fabien Potencier 2010-09-10 14:13:56 +02:00
parent 4237fdd918
commit d326c398e2

View File

@ -60,7 +60,7 @@ class Form extends FieldGroup
if (self::$defaultCsrfSecret !== null) {
$this->setCsrfSecret(self::$defaultCsrfSecret);
} else {
$this->setCsrfSecret(md5(__FILE__.php_uname()));
$this->setCsrfSecret(md5(__FILE__.session_id()));
}
if (self::$defaultCsrfProtection !== false) {