diff options
Diffstat (limited to 'Bugzilla/Memcached.pm')
-rw-r--r-- | Bugzilla/Memcached.pm | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Bugzilla/Memcached.pm b/Bugzilla/Memcached.pm index 1464b6c00..df90fef93 100644 --- a/Bugzilla/Memcached.pm +++ b/Bugzilla/Memcached.pm @@ -254,10 +254,13 @@ sub _get { elsif (ref($value) eq 'ARRAY') { foreach my $value (@$value) { next unless defined $value; - # arrays of hashes are common + # arrays of hashes and arrays are common if (ref($value) eq 'HASH') { _detaint_hashref($value); } + elsif (ref($value) eq 'ARRAY') { + _detaint_arrayref($value); + } elsif (!ref($value)) { trick_taint($value); } @@ -278,6 +281,15 @@ sub _detaint_hashref { } } +sub _detaint_arrayref { + my ($arrayref) = @_; + foreach my $value (@$arrayref) { + if (defined($value) && !ref($value)) { + trick_taint($value); + } + } +} + sub _delete { my ($self, $key) = @_; $key = $self->_encode_key($key) |