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.
This commit is contained in:
commit
acfad5ae52
@ -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