diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 675eda93e6..8fa744806c 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,8 @@ +2010-02-22 Pablo de la ConcepciĆ³n + + * lib/PandoraFMS/DataServer.pm: Fixed bug #2926077 there were one + more place where the timestamp should be checked. + 2010-02-22 Pablo de la ConcepciĆ³n * lib/PandoraFMS/Core.pm: Updated documentation, fixed wrong parameters diff --git a/pandora_server/lib/PandoraFMS/DataServer.pm b/pandora_server/lib/PandoraFMS/DataServer.pm index 2207ce7146..88ebac6ff7 100644 --- a/pandora_server/lib/PandoraFMS/DataServer.pm +++ b/pandora_server/lib/PandoraFMS/DataServer.pm @@ -391,9 +391,14 @@ sub process_module_data ($$$$$$$$$) { logger($pa_config, "Invalid timestamp '$timestamp' from module '$module_name' agent '$agent_name'.", 3); return; } - - my $utimestamp = timelocal($6, $5, $4, $3, $2 - 1, $1 - 1900); - + my $utimestamp; + eval { + $utimestamp = timelocal($6, $5, $4, $3, $2 - 1, $1 - 1900); + }; + if ($@) { + logger($pa_config, "Invalid timestamp '$timestamp' from module '$module_name' agent '$agent_name'.", 3); + return; + } #my $value = get_tag_value ($data, 'data', ''); my $dataObject = get_module_data($data, $agent_name, $module_name, $module_type); my $extraMacros = get_macros_for_data($data, $agent_name, $module_name, $module_type);