{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla-services/screenshots/issues/5183","repository_url":"https://api.github.com/repos/mozilla-services/screenshots","labels_url":"https://api.github.com/repos/mozilla-services/screenshots/issues/5183/labels{/name}","comments_url":"https://api.github.com/repos/mozilla-services/screenshots/issues/5183/comments","events_url":"https://api.github.com/repos/mozilla-services/screenshots/issues/5183/events","html_url":"https://github.com/mozilla-services/screenshots/issues/5183","id":381332895,"node_id":"MDU6SXNzdWUzODEzMzI4OTU=","number":5183,"title":"Include guards around use of IN in servershot.js","user":{"login":"ianb","id":44390,"node_id":"MDQ6VXNlcjQ0Mzkw","avatar_url":"https://avatars1.githubusercontent.com/u/44390?v=4","gravatar_id":"","url":"https://api.github.com/users/ianb","html_url":"https://github.com/ianb","followers_url":"https://api.github.com/users/ianb/followers","following_url":"https://api.github.com/users/ianb/following{/other_user}","gists_url":"https://api.github.com/users/ianb/gists{/gist_id}","starred_url":"https://api.github.com/users/ianb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianb/subscriptions","organizations_url":"https://api.github.com/users/ianb/orgs","repos_url":"https://api.github.com/users/ianb/repos","events_url":"https://api.github.com/users/ianb/events{/privacy}","received_events_url":"https://api.github.com/users/ianb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-15T20:48:12Z","updated_at":"2018-11-16T20:23:48Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"We use a pattern like this in several places:\r\n\r\n```sql\r\n        WHERE data.deviceid IN (${idNums.join(\", \")})\r\n```\r\n\r\nIf `idNums` is the empty list, then this results in a SQL syntax error. It's kind of harmless, it shouldn't ever happen (but it is), and we should throw an error early instead of getting a SQL error."},"comment":{"url":"https://api.github.com/repos/mozilla-services/screenshots/issues/comments/439516326","html_url":"https://github.com/mozilla-services/screenshots/issues/5183#issuecomment-439516326","issue_url":"https://api.github.com/repos/mozilla-services/screenshots/issues/5183","id":439516326,"node_id":"MDEyOklzc3VlQ29tbWVudDQzOTUxNjMyNg==","user":{"login":"punamdahiya","id":597734,"node_id":"MDQ6VXNlcjU5NzczNA==","avatar_url":"https://avatars1.githubusercontent.com/u/597734?v=4","gravatar_id":"","url":"https://api.github.com/users/punamdahiya","html_url":"https://github.com/punamdahiya","followers_url":"https://api.github.com/users/punamdahiya/followers","following_url":"https://api.github.com/users/punamdahiya/following{/other_user}","gists_url":"https://api.github.com/users/punamdahiya/gists{/gist_id}","starred_url":"https://api.github.com/users/punamdahiya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/punamdahiya/subscriptions","organizations_url":"https://api.github.com/users/punamdahiya/orgs","repos_url":"https://api.github.com/users/punamdahiya/repos","events_url":"https://api.github.com/users/punamdahiya/events{/privacy}","received_events_url":"https://api.github.com/users/punamdahiya/received_events","type":"User","site_admin":false},"created_at":"2018-11-16T20:23:48Z","updated_at":"2018-11-16T20:23:48Z","author_association":"COLLABORATOR","body":"Fix of #5184 should resolve this issue by ensuring we check for zero deviceids length before executing the query in all places in servershot.js"}}
{"actor":{"display_login":"punamdahiya"}}