From f3afb66bb75720331b01fe946ab26e5d3b6f0a65 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 15 Nov 2006 04:38:25 +0000 Subject: [PATCH] =?utf8?q?Bug=20323031:=20process=5Fbug.cgi=20crashes=20wh?= =?utf8?q?en=20encountering=20a=20deleted=20user=20account=20and=20when=20?= =?utf8?q?strict=5Fisolation=20is=20on=20-=20Patch=20by=20Fr=C3=83=C2=A9d?= =?utf8?q?=C3=83=C2=A9ric=20Buclin=20=20r=3Dwicked=20a?= =?utf8?q?=3Djustdave?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- process_bug.cgi | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/process_bug.cgi b/process_bug.cgi index 447d600921..c10fec8a1a 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -1370,7 +1370,8 @@ if ($prod_changed && Param("strict_isolation")) { $sth_cc->execute($id); my @blocked_cc = (); while (my ($pid) = $sth_cc->fetchrow_array) { - $usercache{$pid} ||= Bugzilla::User->new($pid); + # Ignore deleted accounts. They will never get notification. + $usercache{$pid} ||= Bugzilla::User->new($pid) || next; my $cc_user = $usercache{$pid}; if (!$cc_user->can_edit_product($prod_id)) { push (@blocked_cc, $cc_user->login); @@ -1385,7 +1386,7 @@ if ($prod_changed && Param("strict_isolation")) { $sth_bug->execute($id); my ($assignee, $qacontact) = $sth_bug->fetchrow_array; if (!$assignee_checked) { - $usercache{$assignee} ||= Bugzilla::User->new($assignee); + $usercache{$assignee} ||= Bugzilla::User->new($assignee) || next; my $assign_user = $usercache{$assignee}; if (!$assign_user->can_edit_product($prod_id)) { ThrowUserError('invalid_user_group', @@ -1395,7 +1396,7 @@ if ($prod_changed && Param("strict_isolation")) { } } if (!$qacontact_checked && $qacontact) { - $usercache{$qacontact} ||= Bugzilla::User->new($qacontact); + $usercache{$qacontact} ||= Bugzilla::User->new($qacontact) || next; my $qa_user = $usercache{$qacontact}; if (!$qa_user->can_edit_product($prod_id)) { ThrowUserError('invalid_user_group', -- 2.47.3