diff options
author | David Lawrence <dkl@redhat.com> | 2014-06-16 17:15:35 +0200 |
---|---|---|
committer | David Lawrence <dkl@redhat.com> | 2014-06-16 17:15:35 +0200 |
commit | 0a2592d00b9d230f78b69c5808cbca108af54967 (patch) | |
tree | 6a0d72b2433b75c2ef8879ec23ff1ff507eb6165 /Bugzilla/WebService/Util.pm | |
parent | dd10df6857319589e15cc404ad8690cdf54a6768 (diff) | |
download | bugzilla-0a2592d00b9d230f78b69c5808cbca108af54967.tar.gz bugzilla-0a2592d00b9d230f78b69c5808cbca108af54967.tar.xz |
Bug 880669 - Extend current BzAPI BMO extension to contain compatibility changes on top of native rest
r=glob
Diffstat (limited to 'Bugzilla/WebService/Util.pm')
-rw-r--r-- | Bugzilla/WebService/Util.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Bugzilla/WebService/Util.pm b/Bugzilla/WebService/Util.pm index 9f053095c..856fd3481 100644 --- a/Bugzilla/WebService/Util.pm +++ b/Bugzilla/WebService/Util.pm @@ -166,14 +166,14 @@ sub filter_wants($$;$$) { delete $exclude{$key}; } - # If the user has asked to include all or exclude all - return $cache->{$field} = 0 if $exclude_types{'all'}; - return $cache->{$field} = 1 if $include_types{'all'}; - # Explicit inclusion/exclusion return $cache->{$field} = 0 if $exclude{$field}; return $cache->{$field} = 1 if $include{$field}; + # If the user has asked to include all or exclude all + return $cache->{$field} = 0 if $exclude_types{'all'}; + return $cache->{$field} = 1 if $include_types{'all'}; + # If the user has not asked for any fields specifically or if the user has asked # for one or more of the field's types (and not excluded them) foreach my $type (keys %field_types) { @@ -214,7 +214,7 @@ sub _delete_bad_keys { # However, we need to validate our argument names in some way. # We know that all hash keys passed in to the WebService will # match \w+, so we delete any key that doesn't match that. - if ($key !~ /^\w+$/) { + if ($key !~ /^[\w\.\-]+$/) { delete $item->{$key}; } } |