Merge branch 'ent-13251-cli-pfms-el-comando-update_agente-con-opcion-custom_id-y-campo-ip-address-permite-inyectar' into 'develop'
Ent-13251-cli-pfms-el-comando-update_agente-con-opcion-custom_id-y-campo-ip-address-permite-inyectar See merge request artica/pandorafms!7128
This commit is contained in:
commit
2f75231cb8
|
@ -90,6 +90,10 @@ function io_safe_input($value)
|
|||
$value = utf8_encode($value);
|
||||
}
|
||||
|
||||
if (preg_match('/<\/?script(.*?)>/', $value)) {
|
||||
$value = preg_replace('/<\/?script(.*?)>/', '', $value);
|
||||
}
|
||||
|
||||
$valueHtmlEncode = htmlentities(($value ?? ''), ENT_QUOTES, 'UTF-8', true);
|
||||
|
||||
// Replace the character '\' for the equivalent html entitie
|
||||
|
|
|
@ -648,6 +648,7 @@ sub safe_input($) {
|
|||
|
||||
return "" unless defined($value);
|
||||
|
||||
$value =~ s/<\/?script(.*?)>//gs;
|
||||
$value =~ s/(.)/$CHR2ENT{$1}||$1/ge;
|
||||
|
||||
return $value;
|
||||
|
|
|
@ -3429,6 +3429,8 @@ sub cli_agent_update() {
|
|||
my @id_agents;
|
||||
my $id_agent;
|
||||
|
||||
$new_value = safe_input($new_value);
|
||||
|
||||
if (defined $use_alias and $use_alias eq 'use_alias') {
|
||||
@id_agents = get_agent_ids_from_alias($dbh,$agent_name);
|
||||
foreach my $id (@id_agents) {
|
||||
|
|
Loading…
Reference in New Issue