Unverified Commit 5ab8ca22 authored by Philipp Winter's avatar Philipp Winter
Browse files

Merge branch 'release-0.8.1'

parents bbf1bdc5 b55c8ca6
Changes in version 0.8.1 - 2019-09-11
* FIXES https://bugs.torproject.org/17626
BridgeDB gets confused when users reply to a "get help" email. The
issue is that BridgeDB interprets commands anywhere in the email body,
even if it's in quoted text. To fix this issue, we are ignoring
commands whose email body line starts with a '>' character, which is
typically used for email quotes.
* FIXES https://bugs.torproject.org/28533
The frontdesk is seeing plenty of empty bogus emails. This fix removes
the email links and instead encourages users to take a look at the Tor
Browser Manual and at our Support Portal.
Changes in version 0.8.0 - 2019-08-20
* FIXES https://bugs.torproject.org/9316
......@@ -58,6 +58,15 @@ TRANSPORT_PATTERN = re.compile(TRANSPORT_REGEXP)
UNBLOCKED_REGEXP = ".*unblocked ([a-z]{2,4})"
#: Regular expressions that we use to match for email commands. Any command is
#: valid as long as it wasn't quoted, i.e., the line didn't start with a '>'
#: character.
HELP_LINE = re.compile("([^>].*)?h[ae]lp")
GET_LINE = re.compile("([^>].*)?get")
KEY_LINE = re.compile("([^>].*)?key")
IPV6_LINE = re.compile("([^>].*)?ipv6")
TRANSPORT_LINE = re.compile("([^>].*)?transport")
UNBLOCKED_LINE = re.compile("([^>].*)?unblocked")
def determineBridgeRequestOptions(lines):
"""Figure out which :mod:`~bridgedb.filters` to apply, or offer help.
......@@ -83,20 +92,20 @@ def determineBridgeRequestOptions(lines):
if not line: skippedHeaders = True
if not skippedHeaders: continue
if ("help" in line) or ("halp" in line):
if HELP_LINE.match(line) is not None:
raise EmailRequestedHelp("Client requested help.")
if "get" in line:
if GET_LINE.match(line) is not None:
logging.debug("Email request was valid.")
if "key" in line:
if KEY_LINE.match(line) is not None:
raise EmailRequestedKey("Email requested a copy of our GnuPG key.")
if "ipv6" in line:
if IPV6_LINE.match(line) is not None:
if "transport" in line:
if TRANSPORT_LINE.match(line) is not None:
if "unblocked" in line:
if UNBLOCKED_LINE.match(line) is not None:
logging.debug("Generating hashring filters for request.")
......@@ -66,8 +66,8 @@ ${next.body(strings, rtl=rtl, lang=lang, **kwargs)}
${_(strings.HELP[1]) % \
("""<a href="mailto:frontdesk@torproject.org">frontdesk@torproject.org</a>""")}
("""<a href="https://tb-manual.torproject.org/circumvention/">Tor Browser Manual</a>""",
"""<a href="https://support.torproject.org/#censorship">Support Portal</a>""")}
</div> <!-- end faq -->
......@@ -84,9 +84,6 @@ ${next.body(strings, rtl=rtl, lang=lang, **kwargs)}
<a href="https://gitweb.torproject.org/bridgedb.git/tree/CHANGELOG">
<i class="icon icon-large icon-rocket"><span id="footer-changelog">&nbsp;${_("Changelog")}</span></i></a>
&nbsp; &middot; &nbsp;
<a href="mailto:frontdesk@torproject.org">
<i class="icon icon-large icon-envelope"><span id="footer-contact">&nbsp;${_("Contact")}</span></i></a>
&nbsp; &middot; &nbsp;
<a href="../keys"><i class="icon icon-large icon-key"><span id="footer-keys">&nbsp;${_("Public Keys")}</span></i></a>
<br />
......@@ -114,14 +114,7 @@ send the email using an address from one of the following email providers:
HELP = {
0: _("My bridges don't work! I need help!"),
# TRANSLATORS: Please DO NOT translate "Tor".
1: _("""If your Tor doesn't work, you should email %s."""),
# TRANSLATORS: Please DO NOT translate "Pluggable Transports".
# TRANSLATORS: Please DO NOT translate "Tor Browser".
# TRANSLATORS: Please DO NOT translate "Tor".
2: _("""\
Try including as much info about your case as you can, including the list of
bridges and Pluggable Transports you tried to use, your Tor Browser version,
and any messages which Tor gave out, etc."""),
1: _("""If your Tor cannot connect, please take a look at the %s and our %s."""),
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment