IntegrityError: duplicate key value violates unique constraint "ticketmessage_message_ticket_uniq
Bug #659184 reported by
Curtis Hovey
This bug report is a duplicate of:
Bug #595166: IntegrityError raised filing a bug using the email interface.
Edit
Remove
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
Critical
|
Unassigned |
Bug Description
OOPS-1745CEMAIL15 shows a problem when processing an incoming email. I have never seen an issue like this.
Changed in launchpad: | |
importance: | High → Critical |
To post a comment you must log in.
The message is spam. It was sent from a compromised email account: /answers. launchpad. net/launchpad- registry/ +question/ 130282
https:/
The violation is question.id and message.id. The rfc822msgid was reused in the spam attack.
The AnswerTrackerHa ndler.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.