mirror of
git://git.proxmox.com/git/pve-common.git
synced 2025-01-06 21:17:37 +03:00
REST Handler: check for value defindness when untainting
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
f27d5e6b7a
commit
12349ad05f
@ -438,7 +438,11 @@ sub handle {
|
||||
# untaint data (already validated)
|
||||
my $extra = delete $param->{'extra-args'};
|
||||
while (my ($key, $val) = each %$param) {
|
||||
($param->{$key}) = $val =~ /^(.*)$/s;
|
||||
if (defined($val)) {
|
||||
($param->{$key}) = $val =~ /^(.*)$/s;
|
||||
} else {
|
||||
$param->{$key} = undef;
|
||||
}
|
||||
}
|
||||
$param->{'extra-args'} = [map { /^(.*)$/ } @$extra] if $extra;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user