From: Frédéric Buclin Date: Tue, 17 Feb 2015 20:32:32 +0000 (+0100) Subject: Bug 1132887: When starting a sudo session, the password is not validated X-Git-Tag: release-5.1.1~368 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10aa3f02a861c50fc89867dfb04cab72de14922f;p=thirdparty%2Fbugzilla.git Bug 1132887: When starting a sudo session, the password is not validated r=dkl a=glob --- diff --git a/relogin.cgi b/relogin.cgi index 6f0c970f1f..c4aae8d0ba 100755 --- a/relogin.cgi +++ b/relogin.cgi @@ -64,6 +64,9 @@ elsif ($action eq 'prepare-sudo') { -httponly => 1, %args); + # The user ID must not be set when generating the token, because + # that information will not be available when validating it. + local Bugzilla->user->{userid} = 0; $vars->{'login_request_token'} = issue_hash_token(['login_request', $value]); }