mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
Form: Create CSRFTokens in way that ensures id uniqueness
This commit is contained in:
parent
974bff9227
commit
7f0ddd931c
@ -1085,7 +1085,7 @@ class Form extends Zend_Form
|
||||
return $this;
|
||||
}
|
||||
if ($this->getElement($this->tokenElementName) === null) {
|
||||
$this->addElement(new CsrfCounterMeasure($this->tokenElementName));
|
||||
$this->addElement('CsrfCounterMeasure', $this->tokenElementName);
|
||||
}
|
||||
}
|
||||
return $this;
|
||||
|
@ -40,7 +40,7 @@ class CsrfCounterMeasure extends FormElement
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
$this->addDecorator('ViewHelper');
|
||||
$this->setDecorators(['ViewHelper']);
|
||||
$this->setValue($this->generateCsrfToken());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user