mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
Calculate md5 checksums byte by byte, not char by char!
(cherry picked from commit dc4d144de8bcce8cc654515aefa0295ecb5065be)
This commit is contained in:
parent
ce179c39aa
commit
6a83598c64
@ -2681,7 +2681,7 @@ sub pandora_delete_module ($$;$) {
|
|||||||
|
|
||||||
my $agent_name = get_agent_name($dbh, $module->{'id_agente'});
|
my $agent_name = get_agent_name($dbh, $module->{'id_agente'});
|
||||||
|
|
||||||
if ((defined($conf)) && (-e $conf->{incomingdir}.'/conf/'.md5($agent_name).'.conf')) {
|
if ((defined($conf)) && (-e $conf->{incomingdir}.'/conf/'.md5(encode_utf8(safe_output($agent_name))).'.conf')) {
|
||||||
enterprise_hook('pandora_delete_module_from_conf', [$conf,$agent_name,$module->{'nombre'}]);
|
enterprise_hook('pandora_delete_module_from_conf', [$conf,$agent_name,$module->{'nombre'}]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2979,12 +2979,11 @@ sub pandora_delete_agent ($$;$) {
|
|||||||
|
|
||||||
if (defined $conf) {
|
if (defined $conf) {
|
||||||
# Delete the conf files
|
# Delete the conf files
|
||||||
if (-e $conf->{incomingdir}.'/conf/'.md5($agent_name).'.conf') {
|
my $conf_fname = $conf->{incomingdir}.'/conf/'.md5(encode_utf8(safe_output($agent_name))).'.conf';
|
||||||
unlink($conf->{incomingdir}.'/conf/'.md5($agent_name).'.conf');
|
unlink($conf_fname) if (-f $conf_fname);
|
||||||
}
|
|
||||||
if (-e $conf->{incomingdir}.'/md5/'.md5($agent_name).'.md5') {
|
my $md5_fname = $conf->{incomingdir}.'/md5/'.md5(encode_utf8(safe_output($agent_name))).'.md5';
|
||||||
unlink($conf->{incomingdir}.'/md5/'.md5($agent_name).'.md5');
|
unlink($md5_fname) if (-f $md5_fname);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach my $module (@modules) {
|
foreach my $module (@modules) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user