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

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



#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
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs