]> 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:32:32 +0000 (21:32 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Tue, 17 Feb 2015 20:32:32 +0000 (21:32 +0100)
r=dkl a=glob

relogin.cgi

index 6f0c970f1fb23ea5e30d501ce665c81413a20903..c4aae8d0bac3273be33dc860ac8d33fcbc47359c 100755 (executable)
@@ -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]);
     }