[tor-bugs] #11370 [BridgeDB]: Compose messages using email package instead of MimeWriter

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Mar 31 11:12:16 UTC 2014


#11370: Compose messages using email package instead of MimeWriter
--------------------------+--------------------------------------------
     Reporter:  sysrqb    |      Owner:  isis
         Type:  defect    |     Status:  assigned
     Priority:  normal    |  Milestone:
    Component:  BridgeDB  |    Version:
   Resolution:            |   Keywords:  bridgedb-email, bridgedb-0.1.7
Actual Points:            |  Parent ID:
       Points:            |
--------------------------+--------------------------------------------
Changes (by isis):

 * status:  needs_review => assigned
 * cc: sysrqb (added)
 * keywords:   => bridgedb-email, bridgedb-0.1.7
 * owner:   => isis


Comment:

 I reviewed and tested these. For the record, there is a
 `twisted.mail.smtp.rfc822.Message` class which works similarly, though I
 did not see any real benefits to switching to it, and the amount of
 refactoring required to do so is greater.

 Because we don't have the best of tests for the email servers, here's what
 I manually tested:
   * A correctly formed email requesting bridges gets bridge lines in
 response.
   * A correctly formed email requesting obfs3 bridges gets obfs bridge
 lines.
   * Too many emails in the allotted time period generates a warning email.
   * The warning email is still sent even if there was a SIGHUP between the
 original request and the one thereafter which occurred too soon.
   * Any further requests after the warning email are dropped on the floor.
   * Emails which are not correctly formatted (i.e. missing certain
 required headers) are dropped on the floor.

 Seems good to me. I'll merge this and #5232 for 0.1.7.

 Thanks, sysrqb!

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/11370#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list