From fd29ee56c4678749c00e7698ef245f7e2967ee10 Mon Sep 17 00:00:00 2001 From: Simon Green Date: Sun, 27 Jul 2014 18:47:21 +1000 Subject: Bug 726696 - All authenticated WebServices methods should require username/pass, token or a valid API key for authentication r=dkl, a=sgreen --- Bugzilla/WebService/Util.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Bugzilla/WebService/Util.pm') diff --git a/Bugzilla/WebService/Util.pm b/Bugzilla/WebService/Util.pm index 26558fc6a..6290139a3 100644 --- a/Bugzilla/WebService/Util.pm +++ b/Bugzilla/WebService/Util.pm @@ -268,6 +268,11 @@ sub fix_credentials { $params->{'Bugzilla_login'} = $params->{'login'}; $params->{'Bugzilla_password'} = $params->{'password'}; } + # Allow user to pass api_key=12345678 as a convenience which becomes + # "Bugzilla_api_key" which is what the auth code looks for. + if (exists $params->{api_key}) { + $params->{Bugzilla_api_key} = delete $params->{api_key}; + } # Allow user to pass token=12345678 as a convenience which becomes # "Bugzilla_token" which is what the auth code looks for. if (exists $params->{'token'}) { -- cgit v1.2.3-24-g4f1b