[tor-commits] [stem/master] Error during hs descriptor decryption failures with python3

atagar at torproject.org atagar at torproject.org
Wed Mar 11 15:07:47 UTC 2015


commit bc42f5d902b2df83e9701bd0ac75fd0c9d53c5b3
Author: Damian Johnson <atagar at torproject.org>
Date:   Wed Mar 11 08:06:57 2015 -0700

    Error during hs descriptor decryption failures with python3
    
    Oops, another spot where we need to do slice rather than indexing (since the
    later provides an int in python3). Caught by cyberpunks on...
    
      https://trac.torproject.org/projects/tor/ticket/15004#comment:18
---
 stem/descriptor/hidden_service_descriptor.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
 



More information about the tor-commits mailing list