Closed Bug 345359 Opened 20 years ago Closed 20 years ago

Prevent Flag::clear from deleting a deleted flag when checking the inclusion and exclusion lists

Categories

(Bugzilla :: Administration, task)

2.23
task
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: LpSolit, Assigned: LpSolit)

Details

Attachments

(1 file)

Because the SQL queries about the inclusion and exclusion lists use SELECT flags.id instead of SELECT DISTINCT flags.id, it's possible under some circumstances to get twice the same flag ID. And the clear() will try to delete a flag which has already been deleted. It may end in a crash.
Attached patch patch, v1Splinter Review
Make sure to not have twice the same flag ID in the list.
Attachment #229991 - Flags: review?(myk)
Status: NEW → ASSIGNED
Flags: approval?
Flags: approval? → approval+
Comment on attachment 229991 [details] [diff] [review] patch, v1 no review needed
Attachment #229991 - Flags: review?(myk)
Checking in editflagtypes.cgi; /cvsroot/mozilla/webtools/bugzilla/editflagtypes.cgi,v <-- editflagtypes.cgi new revision: 1.42; previous revision: 1.41 done Checking in Bugzilla/Flag.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Flag.pm,v <-- Flag.pm new revision: 1.70; previous revision: 1.69 done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Attachment #229991 - Flags: review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: