]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1132887: When starting a sudo session, the password is not validated
authorFrédéric Buclin <LpSolit@gmail.com>
Tue, 17 Feb 2015 20:36:30 +0000 (21:36 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Tue, 17 Feb 2015 20:36:30 +0000 (21:36 +0100)
r=dkl a=glob

relogin.cgi

index 337d1b208251d804d4cbf53d419f891843dcd09b..b86463bb8e0bd5c5baa770179dd5f2d0fd391f1d 100755 (executable)
@@ -61,6 +61,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]);
     }