From 19b514899d02fde1c53916fe0c0a364548c6ab8d Mon Sep 17 00:00:00 2001 From: Reed Loden Date: Tue, 29 May 2012 07:50:08 -0700 Subject: Bug 754673 - CSRF vulnerability in query.cgi allows possible unauthorized use of "Set my default search back to the system default" [r=LpSolit a=LpSolit] --- query.cgi | 3 +++ 1 file changed, 3 insertions(+) (limited to 'query.cgi') diff --git a/query.cgi b/query.cgi index 47be93125..df3d9cadf 100755 --- a/query.cgi +++ b/query.cgi @@ -20,6 +20,7 @@ use Bugzilla::Product; use Bugzilla::Keyword; use Bugzilla::Field; use Bugzilla::Install::Util qw(vers_cmp); +use Bugzilla::Token; ############### # Subroutines # @@ -72,6 +73,8 @@ my $userid = $user->id; if ($cgi->param('nukedefaultquery')) { if ($userid) { + my $token = $cgi->param('token'); + check_hash_token($token, ['nukedefaultquery']); $dbh->do("DELETE FROM namedqueries" . " WHERE userid = ? AND name = ?", undef, ($userid, DEFAULT_QUERY_NAME)); -- cgit v1.2.3-65-gdbad