mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
Fix unescaped error messages (#5329)
In both cases the input, which wasn't escaped before, comes from a form element that doesn't allow any user to change its content. An ordinary user would need to access the DOM in order to do that. Both forms are protected by CSRF, so this mitigates any potential exploit as well. (cherry picked from commit acfad5ae5290d349c0ca4fe10b329e56c23201a0)
This commit is contained in:
parent
64dcc33f6d
commit
244adf61b2
@ -6,7 +6,7 @@
|
||||
<?= $this->tabs->render($this); ?>
|
||||
<br/>
|
||||
<div>
|
||||
<h1>Could not <?= $action; ?> module "<?= $moduleName; ?>"</h1>
|
||||
<h1>Could not <?= $action; ?> module "<?= $this->escape($moduleName); ?>"</h1>
|
||||
<p>
|
||||
While operation the following error occurred:
|
||||
<br />
|
||||
|
@ -227,7 +227,7 @@ class BackendConfigForm extends ConfigForm
|
||||
'autosubmit' => true
|
||||
)
|
||||
);
|
||||
$resourceName = isset($formData['resource']) ? $formData['resource'] : $this->getValue('resource');
|
||||
$resourceName = $this->getView()->escape($formData['resource'] ?? $this->getValue('resource'));
|
||||
$this->addElement(
|
||||
'note',
|
||||
'resource_note',
|
||||
|
Loading…
x
Reference in New Issue
Block a user