diff --git a/ChangeLog b/ChangeLog index 62c4cf06..2eb7097c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 1.9.38 Frontend: * FIX: Fix XSS vulnerability + * FIX: Fix PHP 8.2 deprecation warnings caused by shapes on automaps and host alias * FIX: Fix PHP 8.2 deprecation warnings caused by gettext.inc * FIX: Fix PHP 8.2 deprecation warnings caused by std_speedometer gadget diff --git a/share/server/core/classes/objects/NagVisHost.php b/share/server/core/classes/objects/NagVisHost.php index 69923bee..ad337541 100644 --- a/share/server/core/classes/objects/NagVisHost.php +++ b/share/server/core/classes/objects/NagVisHost.php @@ -33,6 +33,7 @@ class NagVisHost extends NagVisStatefulObject { protected static $langServices = null; protected $host_name; + protected $alias; protected $members = array(); diff --git a/share/server/core/classes/objects/NagVisShape.php b/share/server/core/classes/objects/NagVisShape.php index 9e08f6a5..d5cd2321 100644 --- a/share/server/core/classes/objects/NagVisShape.php +++ b/share/server/core/classes/objects/NagVisShape.php @@ -29,6 +29,7 @@ class NagVisShape extends NagVisStatelessObject { protected $enable_refresh; protected $icon; + protected $icon_size; /** * Class constructor diff --git a/share/server/core/sources/automap.php b/share/server/core/sources/automap.php index 70bdd8a9..27afbd2b 100644 --- a/share/server/core/sources/automap.php +++ b/share/server/core/sources/automap.php @@ -378,12 +378,12 @@ function automap_obj($MAPCFG, &$params, &$saved_config, $obj_name) { $obj['.width'] = $w; $obj['.height'] = $h; - } - $obj['label_show'] = $MAPCFG->getValue(0, 'label_show'); - $obj['label_border'] = $MAPCFG->getValue(0, 'label_border'); - $obj['label_background'] = $MAPCFG->getValue(0, 'label_background'); - $obj['label_maxlen'] = $MAPCFG->getValue(0, 'label_maxlen'); + $obj['label_show'] = $MAPCFG->getValue(0, 'label_show'); + $obj['label_border'] = $MAPCFG->getValue(0, 'label_border'); + $obj['label_background'] = $MAPCFG->getValue(0, 'label_background'); + $obj['label_maxlen'] = $MAPCFG->getValue(0, 'label_maxlen'); + } // Header menu has z-index 100, this object's label the below+1 $obj['z'] = 98; @@ -610,6 +610,10 @@ function automap_tree_to_map_config($MAPCFG, &$params, &$saved_config, &$map_con } $map_config[$tree['object_id']] = $tree; + + // Remove automap internal attribute from <<>> node + if ($map_config[$tree['object_id']]['type'] == 'shape') + unset($map_config[$tree['object_id']]['host_name']); // Remove internal attributes here unset($map_config[$tree['object_id']]['.childs']);