[tor-bugs] #11820 [Obfsproxy]: circuit `NoneType` in obfs3 handshake callbacks

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu May 8 14:27:08 UTC 2014


#11820: circuit `NoneType` in obfs3 handshake callbacks
---------------------------+-----------------
     Reporter:  asn        |      Owner:  asn
         Type:  defect     |     Status:  new
     Priority:  normal     |  Milestone:
    Component:  Obfsproxy  |    Version:
   Resolution:             |   Keywords:
Actual Points:             |  Parent ID:
       Points:             |
---------------------------+-----------------

Comment (by infinity0):

 15:24:07 <infinity0> asn: ah guarding close() is fine, i don't think it
 will hide too much - in this case it wouldn't actually change anything
 because self.circuit is None so it never reaches circuit.close()

 I think we should do both (a) and (b) actually. An extension to (a) would
 be in the form of documentation to advise "If you write a transport and
 you want to access self.circut in *an asynchronous callback*, you always
 have to check if it exists".

 A further option in addition to the two above, which would be more code
 but result in a nicer error message than "NoneType has no attribute
 close", would be to turn BaseTransport.circuit into a @property, and have
 a getter that throws an exception ("closed; did you access this inside a
 callback?") if the underlying variable is None.

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


More information about the tor-bugs mailing list