mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
QuickForm: set csrf value through addHidden
This commit is contained in:
parent
69b394cda5
commit
de843b19ed
@ -155,10 +155,10 @@ abstract class QuickForm extends Zend_Form
|
|||||||
public function regenerateCsrfToken()
|
public function regenerateCsrfToken()
|
||||||
{
|
{
|
||||||
if (! $element = $this->getElement(self::CSRF)) {
|
if (! $element = $this->getElement(self::CSRF)) {
|
||||||
$this->addHidden(self::CSRF);
|
$this->addHidden(self::CSRF, CsrfToken::generate());
|
||||||
$element = $this->getElement(self::CSRF);
|
$element = $this->getElement(self::CSRF);
|
||||||
}
|
}
|
||||||
$element->setValue(CsrfToken::generate())->setIgnore(true);
|
$element->setIgnore(true);
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user