)]}'
{"neutron_lib/api/validators.py":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"c1dca81ef02910f7cdb6235bfcaca78d63c3fb93","unresolved":false,"context_lines":[{"line_number":32,"context_line":"# must be even."},{"line_number":33,"context_line":"MAC_PATTERN \u003d \"^%s[aceACE02468](:%s{2}){5}$\" % (constants.HEX_ELEM,"},{"line_number":34,"context_line":"                                                constants.HEX_ELEM)"},{"line_number":35,"context_line":"CROSS_SITE_SCRIPT_PATTERN \u003d r\"[\u003c\u003e\\\"\u0027\u0026\\/\\\\\\\\]+\""},{"line_number":36,"context_line":"TERMINAL_CONTROL_PATTERN \u003d r\"(\\x9B|\\x1B\\[)[0-?]*[ -\\/]*[@-~]\""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"def _verify_dict_keys(expected_keys, target_dict, strict\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_2d6341df","line":36,"range":{"start_line":35,"start_character":0,"end_line":36,"end_character":61},"updated":"2016-04-30 06:01:23.000000000","message":"Can you give some background about the research you did to arrive at these regexs? Cross-site scripting and terminal control are well-known problems and from what I can tell the more robust solutions do not involve regexs.","commit_id":"108251f66ed740fa505c9bf87579faf0aa6e5be5"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"c1dca81ef02910f7cdb6235bfcaca78d63c3fb93","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        return validate_string(data, max_len\u003dmax_len)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"def validate_string(data, max_len\u003dNone):"},{"line_number":118,"context_line":"    if not isinstance(data, six.string_types):"},{"line_number":119,"context_line":"        msg \u003d _(\"\u0027%s\u0027 is not a valid string\") % data"},{"line_number":120,"context_line":"        LOG.debug(msg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_cdcd6dbc","line":117,"range":{"start_line":117,"start_character":4,"end_line":117,"end_character":19},"updated":"2016-04-30 06:01:23.000000000","message":"What type of string are we claiming to verify here? If it\u0027s a generic string (like for a message) then we can\u0027t reject all the characters you are proposing.\n\nIt seems to me we need to have different classes of strings? Like validate_resource_name_string(), validate_filename_string(), validate_uri_string(), validate_terminal_string(), etc. and leave it up to the attribute to use the appropriate validation.\n\nFurthermore I think the bug is too urgent to require waiting on the neutron-lib update/release/requirements/proposal-bot cycle. Please fix the issue directly in neutron core first -- probably by adding validate_resource_name_string there, and then moving the appropriate bits to lib later.","commit_id":"108251f66ed740fa505c9bf87579faf0aa6e5be5"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"96db7ab9409cab7e4e60263d7d60ca6385e922f6","unresolved":false,"context_lines":[{"line_number":140,"context_line":"       re.search(TERMINAL_CONTROL_PATTERN, data, re.IGNORECASE)):"},{"line_number":141,"context_line":"        msg \u003d (_(\"\u0027%(data)s\u0027 contains illegal characters\") %"},{"line_number":142,"context_line":"               {\u0027data\u0027: data})"},{"line_number":143,"context_line":"        LOG.debug(msg)"},{"line_number":144,"context_line":"        return msg"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"dab17558_b858b433","line":143,"updated":"2016-05-09 18:43:36.000000000","message":"Question -- at this point are we sure there was an attempted attack or could this if block be entered under normal operation?\n\nThe reason I ask is that if we think this is an \"attack\" it seems like we should log warn or something other than debug so its easier for admins to scrape these conditions out of the log data.","commit_id":"29c1e251fccf1c3c5e557d3274db4e3e1665311d"}]}
