This used to be the location of the code for gettor.torproject.org, but
that has been moved into a separate repository. While this old code is
suitable for GetTor mirror sites, it is very out of date and unclear
whether we want to support this going forward.
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.
This fixes an issue caused by gitlab repositories soft-delete for 7 days
before they are fully deleted. If we remove a repository in order
to upload new binaries, we need to be able to create a new one right
away. See https://bugs.torproject.org/33034
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.
We were leaving connections to the database open, which causes some
calls to hang. This adds destructors to the SQLite3 class and the
classes that use it, and refactors some code to make one database
connection per class object. This also makes sure that the destructors
for objects that use databases are actually called.
This will remove gettor requests from the requests database when they
are completed (rather than changing the status to 'SENT'). There's no
need to keep this information around, and we don't want to store
hashed email addresses as identifiers long term.
This change expands the locale parse to have the following properties:
- if only the language code is given, choses the regionalization that
occurs first in the locale list (e.g., "en" --> "en-US"
- if regionalization for the language is *not* present, choses the
generalized language or a different regionalization (e.g. "pt-PT" -->
- parses both the subject and body looking for the most specific
- defaults to en-US if no available language is found
This modifies update_files to update each tor browser binary in gitlab,
internet archive, and google docs, and then delete the binary before
downloading the next one. This will save storage space on the gettor