diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 170930cb5e..ac1ad9af4a 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,11 @@ +2013-01-09 Dario Rodriguez + + * lib/PandoraFMS/DataServer.pm: Fixed a bug which creates modules + with names which have \n\r and later create problems when editing + the module information. + + MARGED FROM 4.0.3 + 2013-01-09 Sancho Lerena * lib/PandoraFMS/NetworkServer.pm: Fixed bug #3555223 about diff --git a/pandora_server/lib/PandoraFMS/DataServer.pm b/pandora_server/lib/PandoraFMS/DataServer.pm index 485e21166b..b03512983b 100644 --- a/pandora_server/lib/PandoraFMS/DataServer.pm +++ b/pandora_server/lib/PandoraFMS/DataServer.pm @@ -462,6 +462,13 @@ sub process_xml_data ($$$$$) { my $module_name = get_tag_value ($module_data, 'name', ''); + # Clean module_name because sometimes due to errors or problems + # creating XMLs it could contain carriage returns and later they + # are a pain when you update module configuration because the name won't + # save the carriage return. + $module_name =~ s/\r//g; + $module_name =~ s/\n//g; + # Unnamed module next if ($module_name eq '');