mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
MonitoredObject: Delete fallback for protected custom variables
fixes #12848
This commit is contained in:
parent
d98732f663
commit
c5c10adf75
@ -446,7 +446,7 @@ abstract class MonitoredObject implements Filterable
|
|||||||
}
|
}
|
||||||
|
|
||||||
$blacklist = array();
|
$blacklist = array();
|
||||||
$blacklistPattern = '/^(.*pw.*|.*pass.*|community)$/i';
|
$blacklistPattern = '';
|
||||||
|
|
||||||
if (($blacklistConfig = Config::module('monitoring')->get('security', 'protected_customvars', '')) !== '') {
|
if (($blacklistConfig = Config::module('monitoring')->get('security', 'protected_customvars', '')) !== '') {
|
||||||
foreach (explode(',', $blacklistConfig) as $customvar) {
|
foreach (explode(',', $blacklistConfig) as $customvar) {
|
||||||
@ -469,7 +469,10 @@ abstract class MonitoredObject implements Filterable
|
|||||||
|
|
||||||
$this->customvars = $customvars;
|
$this->customvars = $customvars;
|
||||||
$this->hideBlacklistedProperties();
|
$this->hideBlacklistedProperties();
|
||||||
$this->customvars = $this->obfuscateCustomVars($this->customvars, $blacklistPattern);
|
|
||||||
|
if ($blacklistPattern) {
|
||||||
|
$this->customvars = $this->obfuscateCustomVars($this->customvars, $blacklistPattern);
|
||||||
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user