mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
monitoring/list/services: Protect custom variables added with ?addColumns
This commit is contained in:
parent
c953e4f92d
commit
e035f5b9f2
@ -120,7 +120,11 @@ if (! $this->compact): ?>
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<?php foreach($this->addColumns as $col): ?>
|
<?php foreach($this->addColumns as $col): ?>
|
||||||
|
<?php if ($service->$col && preg_match('~^_(host|service)_([a-zA-Z0-9_]+)$~', $col, $m)): ?>
|
||||||
|
<td><?= $this->escape(\Icinga\Module\Monitoring\Object\MonitoredObject::protectCustomVars([$m[2] => $service->$col])[$m[2]]) ?></td>
|
||||||
|
<?php else: ?>
|
||||||
<td><?= $this->escape($service->$col) ?></td>
|
<td><?= $this->escape($service->$col) ?></td>
|
||||||
|
<?php endif ?>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user