Module: nagvis
Branch: nagvis-1.4
Commit: 17b83f49e41f702fad19891f83be3d01a1b9873b
URL:    
http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis/commit/?id=17b83f49e41f702fad19891f83be3d01a1b9873b

Author: Lars Michelsen <[email protected]>
Date:   Sun Aug  2 20:29:19 2009 +0200

Added code to prevent read of unwanted attributes

---

 nagvis/nagvis/includes/classes/GlobalMapCfg.php |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/nagvis/nagvis/includes/classes/GlobalMapCfg.php 
b/nagvis/nagvis/includes/classes/GlobalMapCfg.php
index 81a0f51..3581589 100644
--- a/nagvis/nagvis/includes/classes/GlobalMapCfg.php
+++ b/nagvis/nagvis/includes/classes/GlobalMapCfg.php
@@ -1230,6 +1230,10 @@ class GlobalMapCfg {
                                        $createArray = Array('allowed_user' => 
1,
                                                                                
'allowed_for_config' => 1,
                                                                                
'use' => 1);
+                                                                               
+                                       // Don't read these keys
+                                       $ignoreKeys = Array('object_id' => 0,
+                                                           'type' => 0);
                                        
                                        $l = 0;
                                        
@@ -1285,10 +1289,12 @@ class GlobalMapCfg {
                                                                        $sKey = 
trim(substr($file[$l],0,$iDelimPos));
                                                                        $sValue 
= trim(substr($file[$l],($iDelimPos+1)));
                                                                        
-                                                                       
if(isset($createArray[$sKey])) {
-                                                                               
$this->mapConfig[$sObjType][$iObjTypeId][$sKey] = explode(',', $sValue);
-                                                                       } else {
-                                                                               
$this->mapConfig[$sObjType][$iObjTypeId][$sKey] = $sValue;
+                                                                       
if(isset($ignoreKeys[$sKey])) {
+                                                                               
if(isset($createArray[$sKey])) {
+                                                                               
        $this->mapConfig[$sObjType][$iObjTypeId][$sKey] = explode(',', $sValue);
+                                                                               
} else {
+                                                                               
        $this->mapConfig[$sObjType][$iObjTypeId][$sKey] = $sValue;
+                                                                               
}
                                                                        }
                                                                }
                                                        }


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to