[tor-bugs] #1837 [BridgeDB]: bridgedb learns to load file of which bridges are blocked where

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Wed Apr 13 02:04:32 UTC 2011


#1837: bridgedb learns to load file of which bridges are blocked where
----------------------+-----------------------------------------------------
 Reporter:  arma      |          Owner:              
     Type:  defect    |         Status:  needs_review
 Priority:  normal    |      Milestone:              
Component:  BridgeDB  |        Version:              
 Keywords:            |         Parent:  #1608       
   Points:            |   Actualpoints:              
----------------------+-----------------------------------------------------

Comment(by aagbsn):

 Replying to [comment:9 karsten]:
 > Oops.  I didn't mean to change the description.  The sentence "If not,
 can you add a comment saying why this is safe?" was meant as part of the
 comment.

 This is safe because the input (country code) is only used as a query
 against the blocked bridges list. I have updated the function to strip all
 characters except a-zA-Z

 {{{
 def getCCFromRequest(request):
     path = re.sub(r'[^a-zA-Z]', '', request.path)
     if len(path) ==  2:
         return path.lower()
     return None
 }}}

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


More information about the tor-bugs mailing list