Bug 990252 - Using the webservices API, passing in certain keys as parameters containing . and - characters are silently dropped

r=glob,a=justdave


git-svn-id: svn://10.0.0.236/trunk@265310 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzrmirror%bugzilla.org
2014-04-02 19:15:50 +00:00
parent 410fa0439f
commit a96a844876
3 changed files with 5 additions and 4 deletions

View File

@@ -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};
}
}