summaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService/Util.pm
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2014-11-14 20:45:46 +0100
committerDavid Lawrence <dkl@mozilla.com>2014-11-14 20:45:46 +0100
commit987611195db12b9c42cdfdbb383811f99322cdd7 (patch)
tree5c4fe3e26f87b225753a9c70892416fe514e07e7 /Bugzilla/WebService/Util.pm
parentae3093fa0de16ffd653f8c4c55e4311e9264ab08 (diff)
downloadbugzilla-987611195db12b9c42cdfdbb383811f99322cdd7.tar.gz
bugzilla-987611195db12b9c42cdfdbb383811f99322cdd7.tar.xz
Bug 1097813: backport upstream bug 1001462 to bmo/4.2 to fix issue with using tokens with webservice rest api
Diffstat (limited to 'Bugzilla/WebService/Util.pm')
-rw-r--r--Bugzilla/WebService/Util.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/Bugzilla/WebService/Util.pm b/Bugzilla/WebService/Util.pm
index 856fd3481..c21bcd344 100644
--- a/Bugzilla/WebService/Util.pm
+++ b/Bugzilla/WebService/Util.pm
@@ -276,13 +276,13 @@ sub fix_credentials {
# even if not calling GET /login. We also do not delete them as
# GET /login requires "login" and "password".
if (exists $params->{'login'} && exists $params->{'password'}) {
- $params->{'Bugzilla_login'} = $params->{'login'};
- $params->{'Bugzilla_password'} = $params->{'password'};
+ $params->{'Bugzilla_login'} = delete $params->{'login'};
+ $params->{'Bugzilla_password'} = delete $params->{'password'};
}
# 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'}) {
- $params->{'Bugzilla_token'} = $params->{'token'};
+ $params->{'Bugzilla_token'} = delete $params->{'token'};
}
# Allow extensions to modify the credential data before login