[icinga-checkins] icinga.org: icingaweb2/master: MonitoredObject: Delete fallback for protected custom variables

git at icinga.org git at icinga.org
Thu Oct 13 08:57:36 CEST 2016


Module: icingaweb2
Branch: master
Commit: c5c10adf75fd0ce75156ced6ad8f06398517f0ce
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=c5c10adf75fd0ce75156ced6ad8f06398517f0ce

Author: Jennifer Mourek <jennifer.mourek at netways.de>
Date:   Thu Oct 13 08:54:30 2016 +0200

MonitoredObject: Delete fallback for protected custom variables

fixes #12848

---

 .../monitoring/library/Monitoring/Object/MonitoredObject.php    |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/monitoring/library/Monitoring/Object/MonitoredObject.php b/modules/monitoring/library/Monitoring/Object/MonitoredObject.php
index 3214769..b57c4c6 100644
--- a/modules/monitoring/library/Monitoring/Object/MonitoredObject.php
+++ b/modules/monitoring/library/Monitoring/Object/MonitoredObject.php
@@ -446,7 +446,7 @@ abstract class MonitoredObject implements Filterable
         }
 
         $blacklist = array();
-        $blacklistPattern = '/^(.*pw.*|.*pass.*|community)$/i';
+            $blacklistPattern = '';
 
         if (($blacklistConfig = Config::module('monitoring')->get('security', 'protected_customvars', '')) !== '') {
             foreach (explode(',', $blacklistConfig) as $customvar) {
@@ -469,7 +469,10 @@ abstract class MonitoredObject implements Filterable
 
         $this->customvars = $customvars;
         $this->hideBlacklistedProperties();
-        $this->customvars = $this->obfuscateCustomVars($this->customvars, $blacklistPattern);
+
+        if ($blacklistPattern) {
+            $this->customvars = $this->obfuscateCustomVars($this->customvars, $blacklistPattern);
+        }
 
         return $this;
     }



More information about the icinga-checkins mailing list