Data passed through FormHelper::postLink is excluded from CSRF creation of an outer form. Subsequent fix for #8387.

This commit is contained in:
Markus Bauer 2016-03-02 03:02:43 +01:00
parent 7df96b3912
commit 95558d0bba

View file

@ -1883,7 +1883,7 @@ class FormHelper extends AppHelper {
if (isset($options['data']) && is_array($options['data'])) {
foreach (Hash::flatten($options['data']) as $key => $value) {
$fields[$key] = $value;
$out .= $this->hidden($key, array('value' => $value, 'id' => false));
$out .= $this->hidden($key, array('value' => $value, 'id' => false, 'secure' => static::SECURE_SKIP));
}
unset($options['data']);
}