1. 27 Aug, 2021 1 commit
  2. 08 Mar, 2021 2 commits
  3. 25 Jan, 2021 1 commit
  4. 23 Jan, 2021 1 commit
  5. 12 Jan, 2021 1 commit
  6. 12 Jun, 2020 1 commit
  7. 05 Jun, 2020 1 commit
  8. 29 May, 2020 2 commits
    • Philipp Winter's avatar
      Don't assume that request has "command" key. · b3de2e35
      Philipp Winter authored
      If GetTor deals with an autoresponder, it returns an empty request,
      which is then passed to parse_callback, which raises a KeyError because
      of request["command"]:
      
      2020-05-29 19:04:43+0000 [email parser] Error while parsing email content: [Failure instance: Traceback: <class 'KeyError'>: '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
      	--- <exception caught here> ---
      	/usr/lib/python3/dist-packages/twisted/internet/defer.py:1418:_inlineCallbacks
      	/srv/gettor.torproject.org/home/gettor/gettor/parse/email.py:256:parse_callback
      	].
      
      This is a fixup of: <https://bugs.torproject.org/34286>
      b3de2e35
    • Cecylia Bocovich's avatar
      Check to see if email is from an autoresponder · 012ef1a4
      Cecylia Bocovich authored
      This checks to see if an incoming request is from a known autoresponder.
      GetTor can get into infinite loops with itself or postmaster addresses
      (Bug #34286)
      012ef1a4
  9. 22 May, 2020 1 commit
    • Cecylia Bocovich's avatar
      Ignore emails from Mail Delivery System · b78bc3ff
      Cecylia Bocovich authored
      This ignores emails with the username "MAILER-DAEMON", a common email
      for mail delivery systems. The goal of this is to avoid getting into a
      loop with mail delivery system autoresponders after a bounced email.
      b78bc3ff
  10. 04 May, 2020 2 commits
  11. 29 Apr, 2020 2 commits
    • Cecylia Bocovich's avatar
      Delete service instance during shutdown · 21645db1
      Cecylia Bocovich authored
      Before we were calling a non-existent shutdown function. These instances
      already have __del__ functions so we can just call those instead.
      21645db1
    • Cecylia Bocovich's avatar
      Refactor to dry out sendmail · 390120a0
      Cecylia Bocovich authored
      Instead of processing link and help requests separately, we can process
      them together and use the command to determine the different subject and
      body messages.
      
      Removed unused code and simplified database command.
      390120a0
  12. 27 Apr, 2020 1 commit
  13. 13 Apr, 2020 6 commits
  14. 18 Mar, 2020 4 commits
  15. 12 Mar, 2020 3 commits
    • Cecylia Bocovich's avatar
      Make locale parsing less eager · 829fa9fb
      Cecylia Bocovich authored
      This will make the locale parsing more restrictive so that, for example,
      sending "i like fries" will not result in the locale "fr".
      829fa9fb
    • Cecylia Bocovich's avatar
      Add more test cases for different email styles · c8e385ba
      Cecylia Bocovich authored
      teor mentioned in ticket #23225 that some clients will top-post replies
      without quoting the the text. This commit adds a test case for that.
      Since the command detector is greedy, gettor parses the reply first.
      
      Also added a test for bottom-posting.
      c8e385ba
    • Cecylia Bocovich's avatar
      Ensure replies to the help message will work · 0cd6443c
      Cecylia Bocovich authored
      This commit makes some changes and adds some tests to ensure that
      valid replies to the gettor help message will contain links.
      Non-valid replies should still return the GetTor help message.
      0cd6443c
  16. 11 Mar, 2020 1 commit
  17. 06 Mar, 2020 1 commit
    • Cecylia Bocovich's avatar
      Always reply to gettor emails · 61afa2c5
      Cecylia Bocovich authored
      This fixes a bug where improperly formatted emails were not receiving
      gettor replies. We should always reply to emails and default to sending
      a help message if the request was invalid.
      
      This also prioritizes sending links if both a valid links request and
      the word help were sent. Several tests were added.
      61afa2c5
  18. 19 Feb, 2020 4 commits
  19. 13 Feb, 2020 1 commit
  20. 08 Feb, 2020 3 commits
  21. 31 Jan, 2020 1 commit