Re: [tor-bugs] #34286 [Applications/GetTor]: gettor appears to be in an email loop war with a .sk address

2020-05-29 Thread Tor Bug Tracker & Wiki
#34286: gettor appears to be in an email loop war with a .sk address
-+
 Reporter:  arma |  Owner:  cohosh
 Type:  defect   | Status:  closed
 Priority:  Medium   |  Milestone:
Component:  Applications/GetTor  |Version:
 Severity:  Normal   | Resolution:  fixed
 Keywords:   |  Actual Points:
Parent ID:   | Points:
 Reviewer:  phw  |Sponsor:
-+
Changes (by cohosh):

 * status:  merge_ready => closed
 * resolution:   => fixed


Comment:

 Merged and deployed at `2020-05-30T02:03:11+`

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #34286 [Applications/GetTor]: gettor appears to be in an email loop war with a .sk address

2020-05-29 Thread Tor Bug Tracker & Wiki
#34286: gettor appears to be in an email loop war with a .sk address
-+-
 Reporter:  arma |  Owner:  cohosh
 Type:  defect   | Status:  merge_ready
 Priority:  Medium   |  Milestone:
Component:  Applications/GetTor  |Version:
 Severity:  Normal   | Resolution:
 Keywords:   |  Actual Points:
Parent ID:   | Points:
 Reviewer:  phw  |Sponsor:
-+-
Changes (by cohosh):

 * status:  reopened => merge_ready


Comment:

 lgtm. Thanks for catching this!

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #34286 [Applications/GetTor]: gettor appears to be in an email loop war with a .sk address

2020-05-29 Thread Tor Bug Tracker & Wiki
#34286: gettor appears to be in an email loop war with a .sk address
-+--
 Reporter:  arma |  Owner:  cohosh
 Type:  defect   | Status:  reopened
 Priority:  Medium   |  Milestone:
Component:  Applications/GetTor  |Version:
 Severity:  Normal   | Resolution:
 Keywords:   |  Actual Points:
Parent ID:   | Points:
 Reviewer:  phw  |Sponsor:
-+--
Changes (by phw):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 I'm reopening this because we seem to have overlooked a bug. GetTor
 chocked earlier today and I found the following exception in its log file:
 {{{
 2020-05-29 19:04:43+ [email parser] Error while parsing email content:
 [Failure instance: Traceback: : 'command'
 /usr/lib/python3/dist-
 packages/twisted/internet/defer.py:311:addCallbacks
 /usr/lib/python3/dist-
 packages/twisted/internet/defer.py:654:_runCallbacks
 /usr/lib/python3/dist-
 packages/twisted/internet/defer.py:1613:unwindGenerator
 /usr/lib/python3/dist-
 packages/twisted/internet/defer.py:1529:_cancellableInlineCallbacks
 ---  ---
 /usr/lib/python3/dist-
 packages/twisted/internet/defer.py:1418:_inlineCallbacks
 /srv/gettor.torproject.org/home/gettor/gettor/parse/email.py:256:parse_callback
 ].
 }}}

 When GetTor detects an autoresponder, it returns an empty request
 dictionary, `{}`. GetTor then calls `parse_callback`, which assumes that
 the given request has the "command" key but that's not the case.

 Here's a fix:
 https://gitlab.torproject.org/tpo/anti-censorship/gettor-
 project/gettor/-/merge_requests/13

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #34286 [Applications/GetTor]: gettor appears to be in an email loop war with a .sk address

2020-05-29 Thread Tor Bug Tracker & Wiki
#34286: gettor appears to be in an email loop war with a .sk address
-+
 Reporter:  arma |  Owner:  cohosh
 Type:  defect   | Status:  closed
 Priority:  Medium   |  Milestone:
Component:  Applications/GetTor  |Version:
 Severity:  Normal   | Resolution:  fixed
 Keywords:   |  Actual Points:
Parent ID:   | Points:
 Reviewer:  phw  |Sponsor:
-+
Changes (by cohosh):

 * status:  merge_ready => closed
 * resolution:   => fixed


Comment:

 Merged and deployed at `2020-05-29T19:04:49+`.

 Seems to be fixed now :)

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #34286 [Applications/GetTor]: gettor appears to be in an email loop war with a .sk address

2020-05-28 Thread Tor Bug Tracker & Wiki
#34286: gettor appears to be in an email loop war with a .sk address
-+-
 Reporter:  arma |  Owner:  cohosh
 Type:  defect   | Status:  merge_ready
 Priority:  Medium   |  Milestone:
Component:  Applications/GetTor  |Version:
 Severity:  Normal   | Resolution:
 Keywords:   |  Actual Points:
Parent ID:   | Points:
 Reviewer:  phw  |Sponsor:
-+-
Changes (by phw):

 * status:  needs_review => merge_ready


Comment:

 Looks good to me! I left a nitpick as comment.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #34286 [Applications/GetTor]: gettor appears to be in an email loop war with a .sk address

2020-05-25 Thread Tor Bug Tracker & Wiki
#34286: gettor appears to be in an email loop war with a .sk address
-+--
 Reporter:  arma |  Owner:  cohosh
 Type:  defect   | Status:  needs_review
 Priority:  Medium   |  Milestone:
Component:  Applications/GetTor  |Version:
 Severity:  Normal   | Resolution:
 Keywords:   |  Actual Points:
Parent ID:   | Points:
 Reviewer:  phw  |Sponsor:
-+--
Changes (by cohosh):

 * status:  assigned => needs_review


Comment:

 Okay here's another patch that should be more complete:
 https://gitlab.torproject.org/torproject/anti-censorship/gettor-
 project/gettor/-/merge_requests/11

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #34286 [Applications/GetTor]: gettor appears to be in an email loop war with a .sk address

2020-05-23 Thread Tor Bug Tracker & Wiki
#34286: gettor appears to be in an email loop war with a .sk address
-+--
 Reporter:  arma |  Owner:  cohosh
 Type:  defect   | Status:  assigned
 Priority:  Medium   |  Milestone:
Component:  Applications/GetTor  |Version:
 Severity:  Normal   | Resolution:
 Keywords:   |  Actual Points:
Parent ID:   | Points:
 Reviewer:  phw  |Sponsor:
-+--
Changes (by cohosh):

 * status:  merge_ready => assigned


Comment:

 Okay I'm still getting the repeated requests so I looked at the emails in
 the database and found the following:

 {{{
 get...@torproject.org|links|windows|is|email|20200523142434|ONHOLD
 postmaster@[REDACTED].sk|links|windows|is|email|20200523142435|ONHOLD
 }}}

 So our list was incomplete :) Setting this back to assigned to add
 GetTor's own email and `postmaster@` emails to the list we won't respond
 to.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #34286 [Applications/GetTor]: gettor appears to be in an email loop war with a .sk address

2020-05-23 Thread Tor Bug Tracker & Wiki
#34286: gettor appears to be in an email loop war with a .sk address
-+-
 Reporter:  arma |  Owner:  cohosh
 Type:  defect   | Status:  merge_ready
 Priority:  Medium   |  Milestone:
Component:  Applications/GetTor  |Version:
 Severity:  Normal   | Resolution:
 Keywords:   |  Actual Points:
Parent ID:   | Points:
 Reviewer:  phw  |Sponsor:
-+-

Comment (by cohosh):

 Replying to [comment:3 phw]:
 > Looks good to me!

 Thanks, merged and deployed at `2020-05-23T14:21:52+`.
 >
 > On a slightly related note: I believe that an email's body is supposed
 to be separated by two (rather than one) newlines from its header.
 GetTor's unit tests are using only one (and mix \n with \r\n). Python's
 email module is also confused by this and thinks that the body is part of
 the `To` field:

 Created #34300 for this, thanks!

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #34286 [Applications/GetTor]: gettor appears to be in an email loop war with a .sk address

2020-05-22 Thread Tor Bug Tracker & Wiki
#34286: gettor appears to be in an email loop war with a .sk address
-+-
 Reporter:  arma |  Owner:  cohosh
 Type:  defect   | Status:  merge_ready
 Priority:  Medium   |  Milestone:
Component:  Applications/GetTor  |Version:
 Severity:  Normal   | Resolution:
 Keywords:   |  Actual Points:
Parent ID:   | Points:
 Reviewer:  phw  |Sponsor:
-+-
Changes (by phw):

 * status:  needs_review => merge_ready


Comment:

 Looks good to me!

 On a slightly related note: I believe that an email's body is supposed to
 be separated by two (rather than one) newlines from its header. GetTor's
 unit tests are using only one (and mix \n with \r\n). Python's email
 module is also confused by this and thinks that the body is part of the
 `To` field:

 {{{
 In [1]: from email import message_from_string
 In [3]: m=message_from_string("From: MAILER-
 dae...@mx1.riseup.net\nSubject: Undelivered Mail Returned to Sender\r\nTo:
 get...@torproject.org\n osx en\n")
 In [6]: m.items()
 Out[6]:
 [('From', 'mailer-dae...@mx1.riseup.net'),
  ('Subject', 'Undelivered Mail Returned to Sender'),
  ('To', 'get...@torproject.org\n osx en')]
 }}}

 This seems like something we should fix.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #34286 [Applications/GetTor]: gettor appears to be in an email loop war with a .sk address

2020-05-22 Thread Tor Bug Tracker & Wiki
#34286: gettor appears to be in an email loop war with a .sk address
-+--
 Reporter:  arma |  Owner:  cohosh
 Type:  defect   | Status:  needs_review
 Priority:  Medium   |  Milestone:
Component:  Applications/GetTor  |Version:
 Severity:  Normal   | Resolution:
 Keywords:   |  Actual Points:
Parent ID:   | Points:
 Reviewer:  phw  |Sponsor:
-+--
Changes (by cohosh):

 * status:  assigned => needs_review
 * reviewer:   => phw


Comment:

 Here's a patch: https://gitlab.torproject.org/torproject/anti-censorship
 /gettor-project/gettor/-/merge_requests/10

 This was a really good catch.

 Replying to [ticket:34286 arma]:
 > There are probably smart guidelines for avoiding mail loop wars, like
 not answering names that start with mailer-domain, checking for the
 presence of an X-Something-Something header, or rate limiting responses to
 a given address.
 I couldn't find any best practices while poking around, so I went with
 ignoring all emails from `mailer-daemon@` addresses. It will work for most
 cases for now.

 We have a rate-limiter in place, but it only ensures that a single user
 doesn't request links too many times per minute. These means at least one
 of these auto-generation loop emails is still getting in every minute. I
 don't want to limit the total requests received from a given email because
 it's reasonable to expect someone to want to download Tor multiple times
 in their life (see also #33123).

 >
 > And this is a great case where unifying how bridgedb handles its email
 answers, and how gettor does it, will save a lot of headache.

 Yeah, from what I can tell it actually looks like bridgedb might handle
 this by rate limiting (I'll need to look into it further). We might not
 want to handle this in the same way since bridgedb's reasons for rate
 limiting (preventing enumeration) are different from gettor's.

 But in general I agree that this a case in which it is a pain to
 repeatedly solve problems for each system separately.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #34286 [Applications/GetTor]: gettor appears to be in an email loop war with a .sk address

2020-05-22 Thread Tor Bug Tracker & Wiki
#34286: gettor appears to be in an email loop war with a .sk address
-+--
 Reporter:  arma |  Owner:  cohosh
 Type:  defect   | Status:  assigned
 Priority:  Medium   |  Milestone:
Component:  Applications/GetTor  |Version:
 Severity:  Normal   | Resolution:
 Keywords:   |  Actual Points:
Parent ID:   | Points:
 Reviewer:   |Sponsor:
-+--
Changes (by cohosh):

 * status:  new => assigned
 * owner:  (none) => cohosh


Comment:

 Aha! Perhaps this is the reason we're getting so many repeat requests for
 icelandic versions of Tor Browser? I thought someone wrote a bot but this
 seems much more likely.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs