summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Memcached.pm
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2014-08-12 08:09:46 +0200
committerByron Jones <glob@mozilla.com>2014-08-12 08:09:46 +0200
commitbc450dc015ffc325b10d9ffdf59a9b00f82cf70f (patch)
treecd1a476c6d816a883ae8a6477b15bc9e4e7c8d30 /Bugzilla/Memcached.pm
parent2f5c78b7362cc604f341bb1d3a2c4d486f19ce5c (diff)
downloadbugzilla-bc450dc015ffc325b10d9ffdf59a9b00f82cf70f.tar.gz
bugzilla-bc450dc015ffc325b10d9ffdf59a9b00f82cf70f.tar.xz
Bug 993926: Bugzilla::User::Setting::get_all_settings() should use memcached
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 28934e4f5..fdafa0014 100644
--- a/Bugzilla/Memcached.pm
+++ b/Bugzilla/Memcached.pm
@@ -261,10 +261,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);
}
@@ -285,6 +288,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)