diff options
author | David Lawrence <dkl@redhat.com> | 2014-06-18 20:14:15 +0200 |
---|---|---|
committer | David Lawrence <dkl@redhat.com> | 2014-06-18 20:14:15 +0200 |
commit | c67298330f4ac2944a835263ff666ba23f1c5633 (patch) | |
tree | f3f02b191c04f2b0109a64e4a8f45fbf633a6d23 /extensions/BzAPI | |
parent | bc8e351728febbe8c07631a30f6e136af34bfc92 (diff) | |
download | bugzilla-c67298330f4ac2944a835263ff666ba23f1c5633.tar.gz bugzilla-c67298330f4ac2944a835263ff666ba23f1c5633.tar.xz |
Bug 1027195 - The new BzAPI extension has broken the ability to call /rest/login to get a login token for the REST API
Diffstat (limited to 'extensions/BzAPI')
-rw-r--r-- | extensions/BzAPI/Extension.pm | 1 | ||||
-rw-r--r-- | extensions/BzAPI/lib/Util.pm | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/extensions/BzAPI/Extension.pm b/extensions/BzAPI/Extension.pm index 4d144b881..0790e6596 100644 --- a/extensions/BzAPI/Extension.pm +++ b/extensions/BzAPI/Extension.pm @@ -111,6 +111,7 @@ sub webservice_fix_credentials { my ($self, $args) = @_; my $rpc = $args->{rpc}; my $params = $args->{params}; + return if !Bugzilla->request_cache->{bzapi}; fix_credentials($params); } diff --git a/extensions/BzAPI/lib/Util.pm b/extensions/BzAPI/lib/Util.pm index 6446792a0..14b083401 100644 --- a/extensions/BzAPI/lib/Util.pm +++ b/extensions/BzAPI/lib/Util.pm @@ -431,8 +431,9 @@ sub filter { sub fix_credentials { my ($params) = @_; # Allow user to pass in username=foo&password=bar to be compatible - $params->{'Bugzilla_login'} = delete $params->{'username'} if exists $params->{'username'}; - $params->{'Bugzilla_password'} = delete $params->{'password'} if exists $params->{'password'}; + $params->{'Bugzilla_login'} = $params->{'login'} = delete $params->{'username'} + if exists $params->{'username'}; + $params->{'Bugzilla_password'} = $params->{'password'} if exists $params->{'password'}; # Allow user to pass userid=1&cookie=3iYGuKZdyz for compatibility with BzAPI if (exists $params->{'userid'} && exists $params->{'cookie'}) { |