Merge pull request #3979 from christianbeeznest/3975

Settings: Fix CSS file can not be imported (missing token in form) - refs #3975
pull/3998/head
Yannick Warnier 4 years ago committed by GitHub
commit ba0d8f76ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      main/inc/lib/pear/HTML/QuickForm.php

@ -275,11 +275,9 @@ class HTML_QuickForm extends HTML_Common
public function protect() public function protect()
{ {
$token = $this->getSubmitValue('protect_token'); $token = Security::get_existing_token();
if (null === $token) { if (null === $token) {
$token = Security::get_token(); $token = Security::get_token();
} else {
$token = Security::get_existing_token();
} }
$this->addHidden('protect_token', $token); $this->addHidden('protect_token', $token);
$this->setToken($token); $this->setToken($token);

Loading…
Cancel
Save