[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #8755 [Stem]: Controller handles content as unicode in python 3.x (was: Digest validation fails with python 3)



#8755: Controller handles content as unicode in python 3.x
------------------------+---------------------------------------------------
 Reporter:  aj00200     |          Owner:  atagar
     Type:  defect      |         Status:  new   
 Priority:  normal      |      Milestone:        
Component:  Stem        |        Version:        
 Keywords:  controller  |         Parent:        
   Points:              |   Actualpoints:        
------------------------+---------------------------------------------------

Comment(by atagar):

 I see the issue. The problem isn't with the descriptor code (if you use
 parse_file() or the DescriptorReader then it works fine). The problem is
 that stem's Controller normalizes the content that it receives from the
 socket to be unicode rather than bytes. This in turn mangles the contact
 line, causing the validation to fail.

 In particular, we need to drop the str_tools._to_unicode() call from...

 https://gitweb.torproject.org/stem.git/blob/HEAD:/stem/socket.py#l470

 ... then address the rest of the call stack (msg() in the BaseController,
 and all of its callers). Ick.

 I pushed some fixes for other things uncovered by using the python 3.x
 version of pycrypto, but the Controller issue will take a fair bit more
 work to solve.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/8755#comment:13>
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