diff options
author | David Lawrence <dkl@mozilla.com> | 2014-05-12 20:39:23 +0200 |
---|---|---|
committer | David Lawrence <dkl@mozilla.com> | 2014-05-12 20:40:47 +0200 |
commit | 52b113cc1a6a208744ec92ad1b2c91d463ff9202 (patch) | |
tree | f9b40aaf18ee98a0cc474f7aeb318db97edb6535 /Bugzilla/WebService/User.pm | |
parent | d694e688d2b129e6091ee5045066f09f4578f14e (diff) | |
download | bugzilla-52b113cc1a6a208744ec92ad1b2c91d463ff9202.tar.gz bugzilla-52b113cc1a6a208744ec92ad1b2c91d463ff9202.tar.xz |
Backout of Bug 1001462 - Bug.search causes error when using simple token auth and specifying 'token' instead of 'Bugzilla_token'
Diffstat (limited to 'Bugzilla/WebService/User.pm')
-rw-r--r-- | Bugzilla/WebService/User.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Bugzilla/WebService/User.pm b/Bugzilla/WebService/User.pm index 112d336d7..f8358f78d 100644 --- a/Bugzilla/WebService/User.pm +++ b/Bugzilla/WebService/User.pm @@ -54,10 +54,16 @@ sub login { # Username and password params are required foreach my $param ("login", "password") { - (!defined $params->{$param} && !defined $params->{'Bugzilla_' . $param}) + defined $params->{$param} || ThrowCodeError('param_required', { param => $param }); } + # Make sure the CGI user info class works if necessary. + my $input_params = Bugzilla->input_params; + $input_params->{'Bugzilla_login'} = $params->{login}; + $input_params->{'Bugzilla_password'} = $params->{password}; + $input_params->{'Bugzilla_restrictlogin'} = $params->{restrict_login}; + my $user = Bugzilla->login(); my $result = { id => $self->type('int', $user->id) }; |