Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #8162

Closed
Open
Created Feb 05, 2013 by Trac@tracbot

Parsing AddrMapEvent fails because attribute is not always quoted

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 

Trac:
Username: Desoxy

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking