Bug 1044701: "Uninitialized value $token_type" when passing an invalid Bugzilla_api_token value
r=sgreen,a=glob git-svn-id: svn://10.0.0.236/trunk@265484 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
3b5408996c
commit
6d369bd4e4
@ -1 +1 @@
|
||||
9094
|
||||
9095
|
||||
@ -1 +1 @@
|
||||
8770b2cb9cbbb61c1eae54c9ce1f564f9d350044
|
||||
88db66c588e8c411daffb13b53e4a1f5f259dc48
|
||||
@ -57,7 +57,10 @@ sub get_login_info {
|
||||
my $api_token = Bugzilla->input_params->{Bugzilla_api_token};
|
||||
my ($token_user_id, undef, undef, $token_type)
|
||||
= Bugzilla::Token::GetTokenData($api_token);
|
||||
if ($token_type ne 'api_token' || $user_id != $token_user_id) {
|
||||
if (!defined $token_type
|
||||
|| $token_type ne 'api_token'
|
||||
|| $user_id != $token_user_id)
|
||||
{
|
||||
ThrowUserError('auth_invalid_token', { token => $api_token });
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user