summaryrefslogtreecommitdiffstats
path: root/extensions/BzAPI
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/BzAPI')
-rw-r--r--extensions/BzAPI/Extension.pm1
-rw-r--r--extensions/BzAPI/lib/Util.pm5
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'}) {