From c19dc4ffe98074bedb780652af581a1f0edb3b2d Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Tue, 12 Aug 2014 14:05:32 +0800 Subject: Bug 993926: Bugzilla::User::Setting::get_all_settings() should use memcached r=sgreen,a=glob --- Bugzilla/Memcached.pm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'Bugzilla/Memcached.pm') 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) -- cgit v1.2.3-24-g4f1b