From de843b19ed2a87b7aaf6bd246fec1487bcd07787 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sun, 2 Aug 2015 13:42:00 +0200 Subject: [PATCH] QuickForm: set csrf value through addHidden --- library/Director/Web/Form/QuickForm.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/Director/Web/Form/QuickForm.php b/library/Director/Web/Form/QuickForm.php index 195e319e..9f86b5ef 100644 --- a/library/Director/Web/Form/QuickForm.php +++ b/library/Director/Web/Form/QuickForm.php @@ -155,10 +155,10 @@ abstract class QuickForm extends Zend_Form public function regenerateCsrfToken() { if (! $element = $this->getElement(self::CSRF)) { - $this->addHidden(self::CSRF); + $this->addHidden(self::CSRF, CsrfToken::generate()); $element = $this->getElement(self::CSRF); } - $element->setValue(CsrfToken::generate())->setIgnore(true); + $element->setIgnore(true); return $this; }