[tor-bugs] #8285 [Flashproxy]: facilitator-email-poller: don't process registrations that are too old
Tor Bug Tracker & Wiki
blackhole at torproject.org
Wed Jun 5 05:06:35 UTC 2013
#8285: facilitator-email-poller: don't process registrations that are too old
-------------------------+--------------------------------------------------
Reporter: dcf | Owner: dcf
Type: enhancement | Status: needs_revision
Priority: normal | Milestone:
Component: Flashproxy | Version:
Keywords: | Parent:
Points: | Actualpoints:
-------------------------+--------------------------------------------------
Comment(by sukhbir):
Replying to [comment:3 dcf]:
> There needs to be some error handling in case the X-Received header is
missing or can't be parsed. What happens then?
The `X-Received` seems to be a standard Gmail header (I cannot find
official documentation to back that up though) that shows the time the
message was delivered to Gmail servers, so there should be no reason to
believe that it will fail, and hence the `header.splitlines()[-1]`. I know
it looks like a crude implementation, but I based this on the fact that it
is a standard header and thus unlikely to break. Also:
{{{
>>> email.message_from_string(msg)["X-Received"]
'by 10.236.198.136 with SMTP id v...3;\n Fri, 31 May 2013 21:13:41
-0700 (PDT)'
}}}
(Notice the `\n`)
> I at least need a special log message to happen in that case, so that I
can eventually figure out what's wrong and fix it.
OK, I can put that in.
> There's no guarantee that the header will be split across lines in the
same way always. I'm actually kind of surprised that the email code
exposes those line breaks to you. Looking at
http://cr.yp.to/immhf/envelope.html#received, it sounds like it's better
to grab whatever follows the final semicolon. I'm assuming that X-received
is the same as Received in that respect, which seems to be true from
looking at my own inbox.
Yes, the `X-Received` is the same as `Received` in that respect, which is
when the message is delivered to you. The `X-Received` header always
breaks at a newline and has the same "structure", based on a lot of
headers that I have observed. FTA that you linked:
> In practice, SMTP servers put all sorts of badly formatted information
into Received lines.
While that may be correct, it seems like Gmail does use standardized
headers and follows a fixed format. So our assumption of breaking it in
the same way may not be unsound. So how do you want me to handle this?
For the other issues, I have fixed them but I will upload the patch after
we decide about the above issue.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/8285#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list