diff options
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}; } } |