2011-08-10 Vanessa Gil <vanessa.gil@artica.es>

* unix/pandora_agent.php: Fixed error reading collections of the configuration file.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4707 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
vgilc 2011-08-10 15:22:46 +00:00
parent bd2c31a018
commit a190305e12
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2011-08-10 Vanessa Gil <vanessa.gil@artica.es>
* unix/pandora_agent.php: Fixed error reading collections of the configuration file.
2011-08-09 Miguel de Dios <miguel.dedios@artica.es>
* DEBIAN/control: fixed the name of package and update version number.

View File

@ -420,6 +420,11 @@ sub parse_conf_modules($) {
# Collection
} elsif ($line =~ /^\s*file_collection\s+(.+)$/) {
my $collection = $1;
# Prevent path traversal attacks
if ($collection !~ m/(\.\.)|\//) {
$Collections{$collection} = 0;
}
# Min critical
} elsif ($line =~ /^\s*module_min_critical\s+(.*)\s*$/) {
$module->{'min_critical'} = $1;
@ -516,7 +521,7 @@ sub read_config (;$) {
# Remove trailing spaces
$Conf{$1} =~ s/\s*$//;
}
}
}
# Module, plugin and collection definition