commit dd91eda2702e3fb45cff0a9c4cdca148b36d09a6 Author: aagbsn aagbsn@extc.org Date: Wed Jul 18 19:39:03 2012 +0200
4297 - Skip lines before Subject: in email
The email headers may contain the string "IPv6", breaking message parsing. --- lib/bridgedb/Server.py | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/lib/bridgedb/Server.py b/lib/bridgedb/Server.py index c0ca3c2..86a402e 100644 --- a/lib/bridgedb/Server.py +++ b/lib/bridgedb/Server.py @@ -443,10 +443,15 @@ def getMailResponse(lines, ctx): # return None,None
# Figure out which bridges to send - unblocked = transport = ipv6 = False + unblocked = transport = ipv6 = skippedheaders = False bridgeFilterRules = [] addressClass = None for ln in lines: + # ignore all lines before the subject header + if "subject" in ln.strip().lower(): + skippedheaders = True + if not skippedheaders: continue + if "ipv6" in ln.strip().lower(): ipv6 = True if "transport" in ln.strip().lower():
tor-commits@lists.torproject.org