summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Memcached.pm
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2014-08-12 08:05:32 +0200
committerByron Jones <glob@mozilla.com>2014-08-12 08:05:32 +0200
commitc19dc4ffe98074bedb780652af581a1f0edb3b2d (patch)
tree8565697b853e6d9cc84e9e3536b3fcb90d46bb6c /Bugzilla/Memcached.pm
parent8b98912309870c03c4b82396647682a8d9f247b4 (diff)
downloadbugzilla-c19dc4ffe98074bedb780652af581a1f0edb3b2d.tar.gz
bugzilla-c19dc4ffe98074bedb780652af581a1f0edb3b2d.tar.xz
Bug 993926: Bugzilla::User::Setting::get_all_settings() should use memcached
r=sgreen,a=glob
Diffstat (limited to 'Bugzilla/Memcached.pm')
-rw-r--r--Bugzilla/Memcached.pm14
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)