summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-03-17 04:54:20 +0100
committerByron Jones <glob@mozilla.com>2015-03-17 04:54:20 +0100
commit2f65ef51e9ba430783a2d9ef06e0aa0af041d510 (patch)
tree6cc0052ce7329809b96aa07a643aa5a7c5e4a252
parent694d136a06065dbba82b98fe71b432b342c6f82c (diff)
downloadbugzilla-2f65ef51e9ba430783a2d9ef06e0aa0af041d510.tar.gz
bugzilla-2f65ef51e9ba430783a2d9ef06e0aa0af041d510.tar.xz
Bug 1142399: invalid xmlrpc requests warns: Use of uninitialized value $file in substitution (s///) (Bugzilla/WebService/Server/XMLRPC.pm:114)
r=dkl,a=glob
-rw-r--r--Bugzilla/WebService/Server/XMLRPC.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/Bugzilla/WebService/Server/XMLRPC.pm b/Bugzilla/WebService/Server/XMLRPC.pm
index a49ac2033..f3d95ef3d 100644
--- a/Bugzilla/WebService/Server/XMLRPC.pm
+++ b/Bugzilla/WebService/Server/XMLRPC.pm
@@ -98,6 +98,9 @@ sub make_response {
sub handle_login {
my ($self, $classes, $action, $uri, $method) = @_;
my $class = $classes->{$uri};
+ if (!$class) {
+ ThrowCodeError('unknown_method', { method => $method eq 'methodName' ? '' : '.' . $method });
+ }
my $full_method = $uri . "." . $method;
# Only allowed methods to be used from the module's whitelist
my $file = $class;