{"action":"created","issue":{"url":"https://api.github.com/repos/Kinto/kinto/issues/1303","repository_url":"https://api.github.com/repos/Kinto/kinto","labels_url":"https://api.github.com/repos/Kinto/kinto/issues/1303/labels{/name}","comments_url":"https://api.github.com/repos/Kinto/kinto/issues/1303/comments","events_url":"https://api.github.com/repos/Kinto/kinto/issues/1303/events","html_url":"https://github.com/Kinto/kinto/issues/1303","id":246695596,"node_id":"MDU6SXNzdWUyNDY2OTU1OTY=","number":1303,"title":"Crash in postgresql with `?query=u0000`","user":{"login":"leplatrem","id":546692,"node_id":"MDQ6VXNlcjU0NjY5Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/546692?v=4","gravatar_id":"","url":"https://api.github.com/users/leplatrem","html_url":"https://github.com/leplatrem","followers_url":"https://api.github.com/users/leplatrem/followers","following_url":"https://api.github.com/users/leplatrem/following{/other_user}","gists_url":"https://api.github.com/users/leplatrem/gists{/gist_id}","starred_url":"https://api.github.com/users/leplatrem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leplatrem/subscriptions","organizations_url":"https://api.github.com/users/leplatrem/orgs","repos_url":"https://api.github.com/users/leplatrem/repos","events_url":"https://api.github.com/users/leplatrem/events{/privacy}","received_events_url":"https://api.github.com/users/leplatrem/received_events","type":"User","site_admin":false},"labels":[{"id":180758578,"node_id":"MDU6TGFiZWwxODA3NTg1Nzg=","url":"https://api.github.com/repos/Kinto/kinto/labels/bug","name":"bug","color":"fc2929","default":true},{"id":225084679,"node_id":"MDU6TGFiZWwyMjUwODQ2Nzk=","url":"https://api.github.com/repos/Kinto/kinto/labels/easy-pick","name":"easy-pick","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-07-31T09:24:43Z","updated_at":"2018-08-16T11:37:10Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"```\r\nWITH total_filtered AS (\\n            SELECT COUNT(id) AS count\\n              FROM records\\n             WHERE parent_id = %(parent_id)s\\n               AND collection_id = %(collection_id)s\\n               AND id IN %(filters_value_0)s AND (data->%(filters_field_1_0)s IS NOT NULL AND data->%(filters_field_1_0)s = %(filters_value_1)s)\\n        ),\\n        collection_filtered AS (\\n            SELECT id, last_modified, data\\n              FROM records\\n             WHERE parent_id = %(parent_id)s\\n               AND collection_id = %(collection_id)s\\n               AND id IN %(filters_value_0)s AND (data->%(filters_field_1_0)s IS NOT NULL AND data->%(filters_field_1_0)s = %(filters_value_1)s)\\n        ),\\n        fake_deleted AS (\\n            SELECT (%(deleted_field)s)::JSONB AS data\\n        ),\\n        filtered_deleted AS (\\n            SELECT id, last_modified, fake_deleted.data AS data\\n              FROM deleted, fake_deleted\\n             WHERE parent_id = %(parent_id)s\\n               AND collection_id = %(collection_id)s\\n               AND id IN %(filters_value_0)s AND (data->%(filters_field_1_0)s IS NOT NULL AND data->%(filters_field_1_0)s = %(filters_value_1)s)\\n               LIMIT 0\\n        ),\\n        all_records AS (\\n            SELECT * FROM filtered_deleted\\n             UNION ALL\\n            SELECT * FROM collection_filtered\\n        ),\\n        paginated_records AS (\\n            SELECT DISTINCT id\\n              FROM all_records\\n              \\n        )\\n        SELECT total_filtered.count AS count_total,\\n               a.id, as_epoch(a.last_modified) AS last_modified, a.data\\n          FROM paginated_records AS p JOIN all_records AS a ON (a.id = p.id),\\n               total_filtered\\n          ORDER BY last_modified DESC\\n          LIMIT %(pagination_limit)s;\\n        '] [parameters: {'filters_value_1': '\"\\\\u0000\"', 'deleted_field': '{\"deleted\":true}', 'parent_id': '/buckets/blocklists', 'collection_id': 'collection', 'pagination_limit': 10000, 'filters_value_0': ('qa', 'certificates', 'addons', 'plugins', 'gfx'), 'filters_field_1_0': 'query'}]\r\n```"},"comment":{"url":"https://api.github.com/repos/Kinto/kinto/issues/comments/413516071","html_url":"https://github.com/Kinto/kinto/issues/1303#issuecomment-413516071","issue_url":"https://api.github.com/repos/Kinto/kinto/issues/1303","id":413516071,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzUxNjA3MQ==","user":{"login":"alexryabkov","id":4225037,"node_id":"MDQ6VXNlcjQyMjUwMzc=","avatar_url":"https://avatars0.githubusercontent.com/u/4225037?v=4","gravatar_id":"","url":"https://api.github.com/users/alexryabkov","html_url":"https://github.com/alexryabkov","followers_url":"https://api.github.com/users/alexryabkov/followers","following_url":"https://api.github.com/users/alexryabkov/following{/other_user}","gists_url":"https://api.github.com/users/alexryabkov/gists{/gist_id}","starred_url":"https://api.github.com/users/alexryabkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexryabkov/subscriptions","organizations_url":"https://api.github.com/users/alexryabkov/orgs","repos_url":"https://api.github.com/users/alexryabkov/repos","events_url":"https://api.github.com/users/alexryabkov/events{/privacy}","received_events_url":"https://api.github.com/users/alexryabkov/received_events","type":"User","site_admin":false},"created_at":"2018-08-16T11:37:10Z","updated_at":"2018-08-16T11:37:10Z","author_association":"NONE","body":"@leplatrem I've just tried to reproduce this using 7.3.1 - it doesn't crash :) Just FYI: I used Python 3.7."}}
{"actor":{"display_login":"alexryabkov"}}