[tor-bugs] #5603 [Tor Client]: get_configured_bridge_by_addr_port_digest is not robust

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Fri May 11 14:41:15 UTC 2012


#5603: get_configured_bridge_by_addr_port_digest is not robust
------------------------+---------------------------------------------------
 Reporter:  asn         |          Owner:                    
     Type:  defect      |         Status:  new               
 Priority:  major       |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Client  |        Version:                    
 Keywords:              |         Parent:                    
   Points:              |   Actualpoints:                    
------------------------+---------------------------------------------------

Comment(by nickm):

 I think that kind of change might not necessary; the
 bridge_add_from_config() code could just change instead.  That is, you
 could change the logic from:

 {{{
    if ((b = get_configured_bridge_by_addr_port_digest(...)) {
       b->marked_for_removal = 0;
       return;
    }
 }}}

 to:

 {{{
    if ((b = get_configured_bridge_by_addr_port_digest(...)) &&
        addr matches && port matches && digest matches && transport
 matches..) {
       b->marked_for_removal = 0;
       return;
    }
 }}}

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


More information about the tor-bugs mailing list