[tor-bugs] #15004 [Stem]: Hidden service descriptor parsing

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Mar 11 08:09:44 UTC 2015


#15004: Hidden service descriptor parsing
-----------------------------+------------------------
     Reporter:  atagar       |      Owner:  atagar
         Type:  enhancement  |     Status:  new
     Priority:  major        |  Milestone:
    Component:  Stem         |    Version:
   Resolution:               |   Keywords:  descriptor
Actual Points:               |  Parent ID:
       Points:               |
-----------------------------+------------------------

Comment (by cypherpunks):

 The raised DecryptionFailure on ValueError still misses some slicing. The
 patch would be;
 {{{
 diff --git a/stem/descriptor/hidden_service_descriptor.py
 b/stem/descriptor/hidden_service_descriptor.py
 index 8c3ce7d..b0a9551 100644
 --- a/stem/descriptor/hidden_service_descriptor.py
 +++ b/stem/descriptor/hidden_service_descriptor.py
 @@ -317,7 +317,7 @@ class HiddenServiceDescriptor(Descriptor):
      try:
        client_blocks = int(binascii.hexlify(content[1:2]), 16)
      except ValueError:
 -      raise DecryptionFailure("When using basic auth the content should
 start with a number of blocks but wasn't a hex digit: %s" %
 binascii.hexlify(content[1]))
 +      raise DecryptionFailure("When using basic auth the content should
 start with a number of blocks but wasn't a hex digit: %s" %
 binascii.hexlify(content[1:2]))

      # parse the client id and encrypted session keys
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/15004#comment:18>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list