[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:8 karsten]:
 > Ah, there's one more thing that might be problematic or not:
 >
 > {{{
 > def getCCFromRequest(request):
 >     # return the path
 >     if len(request.path) > 1:
 >         return request.path[1:3].lower()
 >     return None
 > }}}
 >
 > In this code we're using the `cc` part of the URL `/cc` requested by a
 bridge user to determine which bridges should be removed from the result.
 Should we try harder to make sure that `cc` are exactly two letters?

 Agreed that it doesn't make sense to service bogus requests.

 {{{
 def getCCFromRequest(request):
     path = request.path.strip('/')
     if len(path) ==  2:
        return path.lower()
    return None
 }}}

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