)]}'
{"glance/api/v2/images.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"6dd2cbb4dce8ed928b60dc82ef1c31cc5bcaa549","unresolved":false,"context_lines":[{"line_number":29,"context_line":"from glance.api import policy"},{"line_number":30,"context_line":"from glance.common import exception"},{"line_number":31,"context_line":"from glance.common import location_strategy"},{"line_number":32,"context_line":"from glance.common.scripts import utils as script_utils"},{"line_number":33,"context_line":"from glance.common import timeutils"},{"line_number":34,"context_line":"from glance.common import utils"},{"line_number":35,"context_line":"from glance.common import wsgi"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa0c359_6cc932aa","line":32,"range":{"start_line":32,"start_character":0,"end_line":32,"end_character":55},"updated":"2018-02-12 08:53:06.000000000","message":"If I comment this line then glance-api service starts without error, looks like problem of circular import.\n\n(Is script_utils intended to be used only for async package? If we move validate_import_uri method to glance/common/utils.py then this proble will get resolved)","commit_id":"f31c3199a90fb62d2c68eb1e78bbda1786883db1"}],"glance/async/flows/_internal_plugins/web_download.py":[{"author":{"_account_id":14084,"name":"Einst Crazy","email":"yu.changcai@99cloud.net","username":"Einst"},"change_message_id":"e10c15c021862e72212894c3e77b5fd7b176daec","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    * disallowed_ports"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"\"\"\")),"},{"line_number":61,"context_line":"    cfg.ListOpt(\u0027disallowed_schemes\u0027,"},{"line_number":62,"context_line":"                item_type\u003dcfg.types.String(quotes\u003dTrue),"},{"line_number":63,"context_line":"                bounds\u003dTrue,"},{"line_number":64,"context_line":"                default\u003d[],"},{"line_number":65,"context_line":"                help\u003d_(\"\"\""},{"line_number":66,"context_line":"Specify the blacklisted url schemes for web-download."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"This option provides blacklisting for uri schemes that web-download import"},{"line_number":69,"context_line":"method will be using. Whitelisting is always priority and ignores any"},{"line_number":70,"context_line":"blacklisting of the schemes but obeys host and port filtering. Blacklisting"},{"line_number":71,"context_line":"can be used to prevent specific scheme to be used when whitelisting is not"},{"line_number":72,"context_line":"in use."},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"For example: If scheme blacklisting contains \u0027http\u0027 and whitelist contains"},{"line_number":75,"context_line":"[\u0027http\u0027, \u0027https\u0027] the whitelist is obeyed on http://example.com but any"},{"line_number":76,"context_line":"other scheme like ftp://example.com is blocked even it\u0027s not blacklisted."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"Possible values:"},{"line_number":79,"context_line":"    * List containing normalized url schemes as they are returned from"},{"line_number":80,"context_line":"    urllib.parse. For example [\u0027ftp\u0027,\u0027https\u0027]"},{"line_number":81,"context_line":"    * By default the list is empty"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"Related options:"},{"line_number":84,"context_line":"    * allowed_schemes"},{"line_number":85,"context_line":"    * allowed_hosts"},{"line_number":86,"context_line":"    * disallowed_hosts"},{"line_number":87,"context_line":"    * allowed_ports"},{"line_number":88,"context_line":"    * disallowed_ports"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"\"\"\")),"},{"line_number":91,"context_line":"    cfg.ListOpt(\u0027allowed_hosts\u0027,"},{"line_number":92,"context_line":"                item_type\u003dcfg.types.String(quotes\u003dTrue),"},{"line_number":93,"context_line":"                bounds\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa0c359_5ad3d660","line":90,"range":{"start_line":61,"start_character":0,"end_line":90,"end_character":6},"updated":"2018-02-10 14:18:43.000000000","message":"As you describe, I can hardly get when to set the blacklist. As all take the permission rule from the white ones.","commit_id":"f31c3199a90fb62d2c68eb1e78bbda1786883db1"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"81d016072d36aa6b12984bce38d09876e41bf7a2","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    * disallowed_ports"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"\"\"\")),"},{"line_number":61,"context_line":"    cfg.ListOpt(\u0027disallowed_schemes\u0027,"},{"line_number":62,"context_line":"                item_type\u003dcfg.types.String(quotes\u003dTrue),"},{"line_number":63,"context_line":"                bounds\u003dTrue,"},{"line_number":64,"context_line":"                default\u003d[],"},{"line_number":65,"context_line":"                help\u003d_(\"\"\""},{"line_number":66,"context_line":"Specify the blacklisted url schemes for web-download."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"This option provides blacklisting for uri schemes that web-download import"},{"line_number":69,"context_line":"method will be using. Whitelisting is always priority and ignores any"},{"line_number":70,"context_line":"blacklisting of the schemes but obeys host and port filtering. Blacklisting"},{"line_number":71,"context_line":"can be used to prevent specific scheme to be used when whitelisting is not"},{"line_number":72,"context_line":"in use."},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"For example: If scheme blacklisting contains \u0027http\u0027 and whitelist contains"},{"line_number":75,"context_line":"[\u0027http\u0027, \u0027https\u0027] the whitelist is obeyed on http://example.com but any"},{"line_number":76,"context_line":"other scheme like ftp://example.com is blocked even it\u0027s not blacklisted."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"Possible values:"},{"line_number":79,"context_line":"    * List containing normalized url schemes as they are returned from"},{"line_number":80,"context_line":"    urllib.parse. For example [\u0027ftp\u0027,\u0027https\u0027]"},{"line_number":81,"context_line":"    * By default the list is empty"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"Related options:"},{"line_number":84,"context_line":"    * allowed_schemes"},{"line_number":85,"context_line":"    * allowed_hosts"},{"line_number":86,"context_line":"    * disallowed_hosts"},{"line_number":87,"context_line":"    * allowed_ports"},{"line_number":88,"context_line":"    * disallowed_ports"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"\"\"\")),"},{"line_number":91,"context_line":"    cfg.ListOpt(\u0027allowed_hosts\u0027,"},{"line_number":92,"context_line":"                item_type\u003dcfg.types.String(quotes\u003dTrue),"},{"line_number":93,"context_line":"                bounds\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa0c359_c7db784c","line":90,"range":{"start_line":61,"start_character":0,"end_line":90,"end_character":6},"in_reply_to":"3fa0c359_5ad3d660","updated":"2018-02-12 14:47:36.000000000","message":"One can, for example set empty list to allowed_schemes and disallow only ftp and http. For the schemes and ports having both is reallymore of a consistency thing than anything else.","commit_id":"f31c3199a90fb62d2c68eb1e78bbda1786883db1"},{"author":{"_account_id":14084,"name":"Einst Crazy","email":"yu.changcai@99cloud.net","username":"Einst"},"change_message_id":"e10c15c021862e72212894c3e77b5fd7b176daec","unresolved":false,"context_lines":[{"line_number":99,"context_line":"method will be using. Whitelisting is always priority and ignores any"},{"line_number":100,"context_line":"blacklisting of the hosts but obeys scheme and port filtering."},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"For example: If scheme blacklisting contains \u0027http\u0027 and whitelist contains"},{"line_number":103,"context_line":"[\u0027http\u0027, \u0027https\u0027] the whitelist is obeyed on http://example.com but any"},{"line_number":104,"context_line":"other scheme like ftp://example.com is blocked even it\u0027s not blacklisted."},{"line_number":105,"context_line":"Same way the whitelisted example.com is only obeyed on the allowed schemes"},{"line_number":106,"context_line":"and or ports. Whitelisting of the host does not allow all schemes and ports"},{"line_number":107,"context_line":"accessed."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"Possible values:"},{"line_number":110,"context_line":"    * List containing normalized hostname or ip like it would be returned"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa0c359_dac6069b","line":107,"range":{"start_line":102,"start_character":13,"end_line":107,"end_character":9},"updated":"2018-02-10 14:18:43.000000000","message":"I think you should take the host as an example here.","commit_id":"f31c3199a90fb62d2c68eb1e78bbda1786883db1"},{"author":{"_account_id":14084,"name":"Einst Crazy","email":"yu.changcai@99cloud.net","username":"Einst"},"change_message_id":"e10c15c021862e72212894c3e77b5fd7b176daec","unresolved":false,"context_lines":[{"line_number":130,"context_line":"method will be using. Whitelisting is always priority and ignores any"},{"line_number":131,"context_line":"blacklisting but obeys scheme and port filtering."},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"For example: If scheme blacklisting contains \u0027http\u0027 and whitelist contains"},{"line_number":134,"context_line":"[\u0027http\u0027, \u0027https\u0027] the whitelist is obeyed on http://example.com but any"},{"line_number":135,"context_line":"other scheme like ftp://example.com is blocked even it\u0027s not blacklisted."},{"line_number":136,"context_line":"The blacklisted example.com is obeyed on any url pointing to that host"},{"line_number":137,"context_line":"regardless of what their scheme or port is."},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"Possible values:"},{"line_number":140,"context_line":"    * List containing normalized hostname or ip like it would be returned"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa0c359_9abcfe06","line":137,"range":{"start_line":133,"start_character":12,"end_line":137,"end_character":43},"updated":"2018-02-10 14:18:43.000000000","message":"ditto","commit_id":"f31c3199a90fb62d2c68eb1e78bbda1786883db1"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"c1c841c9eb1805891e5bad670bf496487de50859","unresolved":false,"context_lines":[{"line_number":89,"context_line":""},{"line_number":90,"context_line":"\"\"\")),"},{"line_number":91,"context_line":"    cfg.ListOpt(\u0027allowed_hosts\u0027,"},{"line_number":92,"context_line":"                item_type\u003dcfg.types.String(quotes\u003dTrue),"},{"line_number":93,"context_line":"                bounds\u003dTrue,"},{"line_number":94,"context_line":"                default\u003d[],"},{"line_number":95,"context_line":"                help\u003d_(\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa0c359_7918c083","line":92,"updated":"2018-02-14 20:50:44.000000000","message":"maybe use cfg.types.HostAddress instead?  It can handle hostnames or IPv4/6 numbers.  (Plus it was added by Dharini, former glance core!)","commit_id":"0751f2f11f53e7b98feed2bdca15a7ce99cbcccd"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"c1c841c9eb1805891e5bad670bf496487de50859","unresolved":false,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":"\"\"\")),"},{"line_number":152,"context_line":"    cfg.ListOpt(\u0027allowed_ports\u0027,"},{"line_number":153,"context_line":"                default\u003d[\u002780\u0027, \u0027443\u0027],"},{"line_number":154,"context_line":"                help\u003d_(\"\"\""},{"line_number":155,"context_line":"Specify the allowed ports for web-download."},{"line_number":156,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa0c359_d9a6b454","line":153,"updated":"2018-02-14 20:50:44.000000000","message":"I think this needs to have\n\nitem_type\u003dcfg.types.Integer(min\u003d1, max\u003d65535)\n\nand change the integers to strings.  (You could keep strings here and convert the port from urllib, but then you\u0027d lose the ability to enforce legal port values in the config file.)\n\n(I believe that 0 is a legal port, but I think it sometimes has a special meaning, so I left it out.  Your call.)","commit_id":"0751f2f11f53e7b98feed2bdca15a7ce99cbcccd"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"c1c841c9eb1805891e5bad670bf496487de50859","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    * disallowed_ports"},{"line_number":175,"context_line":"\"\"\")),"},{"line_number":176,"context_line":"    cfg.ListOpt(\u0027disallowed_ports\u0027,"},{"line_number":177,"context_line":"                default\u003d[],"},{"line_number":178,"context_line":"                help\u003d_(\"\"\""},{"line_number":179,"context_line":"Specify the disallowed ports for web-download."},{"line_number":180,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa0c359_b97e48ad","line":177,"updated":"2018-02-14 20:50:44.000000000","message":"Same comment as line 153.","commit_id":"0751f2f11f53e7b98feed2bdca15a7ce99cbcccd"}],"glance/common/utils.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"c1c841c9eb1805891e5bad670bf496487de50859","unresolved":false,"context_lines":[{"line_number":140,"context_line":"    parsed_uri \u003d urllib.parse.urlparse(uri)"},{"line_number":141,"context_line":"    scheme \u003d parsed_uri.scheme"},{"line_number":142,"context_line":"    host \u003d parsed_uri.hostname"},{"line_number":143,"context_line":"    port \u003d parsed_uri.port"},{"line_number":144,"context_line":"    wl_schemes \u003d CONF.import_filtering_opts.allowed_schemes"},{"line_number":145,"context_line":"    bl_schemes \u003d CONF.import_filtering_opts.disallowed_schemes"},{"line_number":146,"context_line":"    wl_hosts \u003d CONF.import_filtering_opts.allowed_hosts"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa0c359_99090c97","line":143,"range":{"start_line":143,"start_character":4,"end_line":143,"end_character":26},"updated":"2018-02-14 20:50:44.000000000","message":"according to the docs, this will be an int, but it looks like you\u0027re using strings in the config file, so \u0027port in wl_ports\u0027 will always be False.","commit_id":"0751f2f11f53e7b98feed2bdca15a7ce99cbcccd"}]}
