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

[tor-bugs] #7110 [Flashproxy]: Do real parsing of boolean query string parameters



#7110: Do real parsing of boolean query string parameters
------------------------+---------------------------------------------------
 Reporter:  dcf         |          Owner:  dcf
     Type:  defect      |         Status:  new
 Priority:  minor       |      Milestone:     
Component:  Flashproxy  |        Version:     
 Keywords:              |         Parent:     
   Points:              |   Actualpoints:     
------------------------+---------------------------------------------------
 The `debug` query string parameter accepts anything, even values like
 `"0"` and false, as a way to turn on debug mode.

 http://crypto.stanford.edu/flashproxy/embed.html?debug=0

 Add a `get_query_string_param_boolean` function and use it to read the
 `debug` value. The function should return true when it receives any of
 these three strings (and only these strings; no case-folding or anything
 else):
 * `"true"`
 * `"1"`
 * `""`
 The function should return false iff it receives either of these strings:
 * `"false"`
 * `"0"`
 The function should return `null` in all other cases.

 There need to be a couple of simple test cases added to `flashproxy-
 test.js`.

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