[tor-bugs] #14314 [Stem]: ExitPolicy.can_exit_to() returns incorrect results when address is omitted

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Jan 21 17:32:46 UTC 2015


#14314: ExitPolicy.can_exit_to() returns incorrect results when address is omitted
--------------------------+--------------------
     Reporter:  nskinkel  |      Owner:  atagar
         Type:  defect    |     Status:  new
     Priority:  normal    |  Milestone:
    Component:  Stem      |    Version:
   Resolution:            |   Keywords:
Actual Points:            |  Parent ID:
       Points:            |
--------------------------+--------------------

Comment (by atagar):

 Hi Nik, something definitely seems inverted here...

 {{{
 >>> policy = ExitPolicy('reject 1.0.0.0/8:*', 'accept *:*')
 >>> policy.can_exit_to(port=443, strict=False)
 False
 >>> policy.can_exit_to(port=443, strict=True)
 True
 }}}

 Thanks for the catch! I'm surprised this has remained uncaught for so long
 (especially since this module has particularly good test coverage). Oh
 well.

 I'm presently finishing up a feature branch but I should be able to get
 this sorted out this weekend or soon after.

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


More information about the tor-bugs mailing list