IntegrityError raised filing a bug using the email interface

Bug #595166 reported by Diogo Matsubara
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Aaron Bentley

Bug Description

As seen on OOPS-1626CEMAIL4 an IntegrityError: duplicate key value violates unique constraint "bugnotification__bug__message__unq" was raised when the user tried to file a new bug report using the email interface.

Related branches

Graham Binns (gmb)
Changed in malone:
importance: Undecided → High
status: New → Triaged
Revision history for this message
Curtis Hovey (sinzui) wrote :

This is also bug 659184

Changed in launchpad:
importance: High → Critical
Revision history for this message
Robert Collins (lifeless) wrote :

From the dup: """"curtis says: The message is spam. It was sent from a compromised email account:
    https://answers.launchpad.net/launchpad-registry/+question/130282

The violation is question.id and message.id. The rfc822msgid was reused in the spam attack.

The AnswerTrackerHandler.process() method, uses messageset.fromEmail() to create a message object, but fromEmail() is also a lookup method. Since the rfc822msgid was reused, the first attack message was retrieved instead of creating a new one. Question.addComment() failed because the message associated with rfc822msgid already exists. fromEmail() is used by both the answers and the bug handlers and both assume the message was created.

Both answers and bugs mail processes could trying looking up the message by rfc822msgid first or verify the message is not already linked. I suppose the latter is preferable since this kind of attack is rare."""

Curtis Hovey (sinzui)
tags: added: easy
Aaron Bentley (abentley)
Changed in launchpad:
assignee: nobody → Aaron Bentley (abentley)
status: Triaged → In Progress
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
William Grant (wgrant)
tags: added: bad-commit-13139 qa-bad
removed: qa-needstesting
William Grant (wgrant)
Changed in launchpad:
status: Fix Committed → In Progress
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
removed: qa-bad
Changed in launchpad:
status: In Progress → Fix Committed
Aaron Bentley (abentley)
tags: added: qa-untestable
removed: qa-needstesting
William Grant (wgrant)
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.