diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 01da6ee6f6..6374b7790d 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2010-10-08 Sancho Lerena + + * include/functions_io.php: Added \s character to list of HTML decoded/encoded + items to be converted from user entries (Safety for XSS and SQL Injection). + + * pandoradb_data.sql: Added more default templates, actions and commands. + This is for remote agent management (refresh). + 2010-10-08 Raúl Mateos * operation/agentes/estado_monitores.php: Center status icon. diff --git a/pandora_console/include/functions_io.php b/pandora_console/include/functions_io.php index d60f1a89cd..871e9fb751 100755 --- a/pandora_console/include/functions_io.php +++ b/pandora_console/include/functions_io.php @@ -45,7 +45,7 @@ function safe_input($value) { $valueHtmlEncode = str_replace(')', ")", $valueHtmlEncode); //Replace some characteres for html entities - for ($i=0;$i<32;$i++) { + for ($i=0;$i<33;$i++) { $valueHtmlEncode = str_ireplace(chr($i),ascii_to_html($i), $valueHtmlEncode); } diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 05938a1e2b..2f39081cec 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -384,9 +384,15 @@ INSERT INTO `tgis_map_layer` VALUES (1,'Group All',1,0,1,0); -- example alert template +INSERT INTO `talert_commands` VALUES (10,'Remote agent control','/usr/share/pandora_server/udp_client.pl _address_ 41122 "_field1_"','This command is used to send commands to the Pandora FMS agents with the UDP server enabled. The UDP server is used to order agents (Windows and UNIX) to "refresh" the agent execution: that means, to force the agent to execute and send data to s',0); + INSERT INTO `talert_actions` VALUES (1,'Mail to XXX',1,'yourmail@domain.es','[PANDORA] Alert from agent _agent_ on module _module_','',0); +INSERT INTO `talert_actions` VALUES (2,'Restart agent',10,'REFRESH AGENT','','',0); + INSERT INTO `talert_templates` VALUES (1,'Critical condition','This is a generic alert template to fire on condition CRITICAL',1,'','','Hello, this is an automated email coming from Pandora FMS\r\n\r\nThis alert has been fired because a CRITICAL condition in one of your monitored items:\r\n\r\nAgent : _agent_\r\nModule: _module_\r\nModule description: _moduledescription_\r\nTimestamp _timestamp_\r\nCurrent value: _data_\r\n\r\nThanks for your time.\r\n\r\nBest regards\r\nPandora FMS\r\n','critical','',1,0.00,0.00,86400,1,0,'12:00:00','12:00:00',1,1,1,1,1,1,1,1,'[PANDORA] Alert RECOVERED for CRITICAL status on _agent_ / _module_','Hello, this is an automated email coming from Pandora FMS\r\n\r\nThis alert has been RECOVERED from a CRITICAL condition in one of your monitored items:\r\n\r\nAgent : _agent_\r\nModule: _module_\r\nModule description: _moduledescription_\r\nTimestamp _timestamp_\r\nCurrent value: _data_\r\n\r\nThanks for your time.\r\n\r\nBest regards\r\nPandora FMS\r\n',4,0); +INSERT INTO `talert_templates` VALUES (2,'Manual alert','This is a template used to fire manual alerts, condition defined here never will be executed. Use this template to assign to your actions/commands used to do remote management (Agent restart, execute commands on server, etc).',NULL,'','','','max_min','',1,0.00,1.00,86400,1,0,'12:00:00','12:00:00',1,1,1,1,1,1,1,0,'','',1,0); +INSERT INTO `talert_templates` VALUES (3,'Warning condition','This is a generic alert template to fire on WARNING condition.',1,'','','Hello, this is an automated email coming from Pandora FMS This alert has been fired because a WARNING condition in one of your monitored items: Agent : _agent_ Module: _module_ Module description: _moduledescription_ Timestamp _timestamp_ Current value: _data_ Thanks for your time. Best regards Pandora FMS ','warning','',1,0.00,0.00,86400,1,0,'12:00:00','12:00:00',1,1,1,1,1,1,1,1,'[PANDORA] Alert RECOVERED for WARNING status on _agent_ / _module_','Hello, this is an automated email coming from Pandora FMS This alert has been RECOVERED from a WARNING condition in one of your monitored items: Agent : _agent_ Module: _module_ Module description: _moduledescription_ Timestamp _timestamp_ Current value: _data_ Thanks for your time. Best regards Pandora FMS ',3,0);