2014-05-27 Ramon Novoa <rnovoa@artica.es>

* lib/PandoraFMS/Core.pm: Make sure critical_str and warning_str are valid
	  regular expressions.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10020 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
ramonn 2014-05-27 14:07:09 +00:00
parent 26d8f8a60d
commit f18d4a3cf3
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2014-05-27 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/Core.pm: Make sure critical_str and warning_str are valid
regular expressions.
2014-05-27 Ramon Novoa <rnovoa@artica.es>
* bin/tentacle_server: Updated to the latest version.

View File

@ -3268,8 +3268,8 @@ sub get_module_status ($$$) {
}
# Set default critical max/min/str values
$critical_str = defined ($critical_str) ? safe_output($critical_str) : '';
$warning_str = defined ($warning_str)? safe_output($warning_str) : '';
$critical_str = (defined ($critical_str) && valid_regex ($critical_str) == 1) ? safe_output($critical_str) : '';
$warning_str = (defined ($warning_str) && valid_regex ($warning_str) == 1) ? safe_output($warning_str) : '';
if ($module_type =~ m/_proc$/ && ($critical_min eq $critical_max)) {
($critical_min, $critical_max) = (0, 1);