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

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



#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):

 Oh wait! Think I know what's going on. Presently strict means "if the
 address or port is omitted, then don't take that into account". So what's
 happening is as follows...

 * With strict=False
  * We check the first rule (reject 1.0.0.0/8:*) and ignore the address
 component since we only provided a port so it's equivalent to 'reject
 *:*'. That matches so we return false.

 * With strict=True
  * We check the first rule (reject 1.0.0.0/8:*) and don't match because
 the address component doesn't match.
  * We check the second rule (accept *:*). That matches so we return true.

 Agreed, this doesn't match what the documentation suggests.

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