MonitoredObject: Delete fallback for protected custom variables

fixes #12848
This commit is contained in:
Jennifer Mourek 2016-10-13 08:54:30 +02:00
parent d98732f663
commit c5c10adf75

View File

@ -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;
} }