[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #8162 [Stem]: Parsing AddrMapEvent fails because attribute is not always quoted
#8162: Parsing AddrMapEvent fails because attribute is not always quoted
--------------------+-------------------------------------------------------
Reporter: Desoxy | Owner: atagar
Type: defect | Status: new
Priority: normal | Milestone:
Component: Stem | Version:
Keywords: | Parent:
Points: | Actualpoints:
--------------------+-------------------------------------------------------
The AddrMapEvent class expects that "expiry" is a QUOTED argument, but
according to the spec it is either quoted or the value NEVER:
{{{
Syntax:
"650" SP "ADDRMAP" SP Address SP NewAddress SP Expiry
[SP "error=" ErrorCode] [SP "EXPIRES=" UTCExpiry] CRLF
NewAddress = Address / "<error>"
Expiry = DQUOTE ISOTime DQUOTE / "NEVER"
ErrorCode = "yes" / "internal" / "Unable to launch resolve request"
UTCExpiry = DQUOTE IsoTime DQUOTE
}}}
Tor seems to return the value NEVER when the result is already in the DNS
cache because of a query made by another control connection.
{{{
desoxy@localhost:~/git/stem$ ./example.py ; ./example.py
Exception in thread Event Notifier:
Traceback (most recent call last):
File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
self.run()
File "/usr/lib/python2.6/threading.py", line 484, in run
self.__target(*self.__args, **self.__kwargs)
File "./stem/stem/control.py", line 602, in _event_loop
self._handle_event(event_message)
File "./stem/stem/control.py", line 2004, in _handle_event
stem.response.convert("EVENT", event_message, arrived_at =
time.time())
File "./stem/stem/response/__init__.py", line 117, in convert
message._parse_message(**kwargs)
File "./stem/stem/response/events.py", line 55, in _parse_message
self._parse_standard_attr()
File "./stem/stem/response/events.py", line 100, in _parse_standard_attr
raise stem.ProtocolError("The %s value should be quoted, but didn't
have a starting quote: %s" % (attr_name, self))
ProtocolError: The expiry value should be quoted, but didn't have a
starting quote: ADDRMAP heise.de 193.99.144.80 NEVER
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/8162>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs