From 90d86a9744883ccc120a0a955ffade72990e1505 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Thu, 14 Apr 2016 21:03:00 +0200 Subject: Bug 1088022 - Bump min version to CGI 4.09 r=dkl --- relogin.cgi | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'relogin.cgi') diff --git a/relogin.cgi b/relogin.cgi index 65c29a2c4..798bba00d 100755 --- a/relogin.cgi +++ b/relogin.cgi @@ -101,8 +101,9 @@ elsif ($action eq 'begin-sudo') { # Did the user actually go trough the 'sudo-prepare' action? Do some # checks on the token the action should have left. + my $token = $cgi->param('token'); my ($token_user, $token_timestamp, $token_data) = - Bugzilla::Token::GetTokenData($cgi->param('token')); + Bugzilla::Token::GetTokenData($token); unless (defined($token_user) && defined($token_data) && ($token_user == $user->id) @@ -111,13 +112,13 @@ elsif ($action eq 'begin-sudo') { ThrowUserError('sudo_preparation_required', { target_login => $target_login, reason => $reason }); } - delete_token($cgi->param('token')); + delete_token($token); # Calculate the session expiry time (T + 6 hours) my $time_string = time2str('%a, %d-%b-%Y %T %Z', time + MAX_SUDO_TOKEN_AGE, 'GMT'); # For future sessions, store the unique ID of the target user - my $token = Bugzilla::Token::_create_token($user->id, 'sudo', $target_user->id); + $token = Bugzilla::Token::_create_token($user->id, 'sudo', $target_user->id); my %args; if (Bugzilla->params->{ssl_redirect}) { -- cgit v1.2.3-24-g4f1b