From 453810967e6ef61ab036332b09be0a6576a56d84 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Wed, 2 Apr 2014 18:59:52 +0000 Subject: Bug 990252 - Using the webservices API, passing in certain keys as parameters containing . and - characters are silently dropped r=glob,a=justdave --- Bugzilla/WebService/Util.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Bugzilla/WebService/Util.pm b/Bugzilla/WebService/Util.pm index 7f6d14b59..bb27a0a33 100644 --- a/Bugzilla/WebService/Util.pm +++ b/Bugzilla/WebService/Util.pm @@ -171,8 +171,9 @@ sub _delete_bad_keys { # Making something a hash key always untaints it, in Perl. # 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+$/) { + # match \w+, contain '.' or '-', so we delete any key that + # doesn't match that. + if ($key !~ /^[\w\.\-]+$/) { delete $item->{$key}; } } -- cgit v1.2.3-24-g4f1b