diff options
author | David Lawrence <dkl@mozilla.com> | 2014-07-31 19:09:53 +0200 |
---|---|---|
committer | David Lawrence <dkl@mozilla.com> | 2014-07-31 19:09:53 +0200 |
commit | 88db66c588e8c411daffb13b53e4a1f5f259dc48 (patch) | |
tree | 9b008eb97da209ab864a91a694ac827c069f8b36 /Bugzilla | |
parent | 8770b2cb9cbbb61c1eae54c9ce1f564f9d350044 (diff) | |
download | bugzilla-88db66c588e8c411daffb13b53e4a1f5f259dc48.tar.gz bugzilla-88db66c588e8c411daffb13b53e4a1f5f259dc48.tar.xz |
Bug 1044701: "Uninitialized value $token_type" when passing an invalid Bugzilla_api_token value
r=sgreen,a=glob
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Auth/Login/Cookie.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Bugzilla/Auth/Login/Cookie.pm b/Bugzilla/Auth/Login/Cookie.pm index 9c18903b6..e3ba98183 100644 --- a/Bugzilla/Auth/Login/Cookie.pm +++ b/Bugzilla/Auth/Login/Cookie.pm @@ -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 }); } } |