[Form] Fixed CSRF protection

This commit is contained in:
Bernhard Schussek 2011-03-02 15:01:04 +01:00
parent 5705f74bd0
commit ea49621034

View File

@ -634,8 +634,10 @@ class Form extends Field implements \IteratorAggregate, FormInterface, FilterInt
$token = $provider->generateCsrfToken(get_class($this)); $token = $provider->generateCsrfToken(get_class($this));
// FIXME $this->add('hidden', $fieldName, array(
// $this->add(new HiddenField($fieldName, array('data' => $token))); 'data' => $token,
'property_path' => null,
));
} }
public function disableCsrfProtection() public function disableCsrfProtection()