Merge lp://staging/~mbp/launchpad/893612-mail-too-big into lp://staging/launchpad

Proposed by Martin Pool
Status: Merged
Approved by: Ian Booth
Approved revision: no longer in the source branch.
Merged at revision: 15100
Proposed branch: lp://staging/~mbp/launchpad/893612-mail-too-big
Merge into: lp://staging/launchpad
Diff against target: 141 lines (+56/-12)
4 files modified
lib/lp/services/mail/incoming.py (+21/-1)
lib/lp/services/mail/signedmessage.py (+6/-1)
lib/lp/services/mail/tests/test_incoming.py (+27/-1)
lib/lp/services/messages/model/message.py (+2/-9)
To merge this branch: bzr merge lp://staging/~mbp/launchpad/893612-mail-too-big
Reviewer Review Type Date Requested Status
Ian Booth (community) Approve
Review via email: mp+101865@code.staging.launchpad.net

Commit message

Detect incoming too-big email messages early, and give a notication not an oops

Description of the change

At the moment, if you send an >10MB message to Launchpad, it records an oops, and sends a message back to the user saying there was an oops.

This happens fairly late in processing, while running the handler.

This patch changes it so we do an up-front check as early as is easy, and give the user a regular error notification. This ought to eliminate one stream of oopses (I don't know if it's very common.)

There's a unit test and I also tried running a message through process-one-mail. I also confirmed the bug's still live on lp.

To post a comment you must log in.
Revision history for this message
Ian Booth (wallyworld) wrote :

Excellent fix. Thank you.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.