{"action":"opened","number":1,"pull_request":{"url":"https://api.github.com/repos/Shopify/lua-nginx-module/pulls/1","id":82259235,"html_url":"https://github.com/Shopify/lua-nginx-module/pull/1","diff_url":"https://github.com/Shopify/lua-nginx-module/pull/1.diff","patch_url":"https://github.com/Shopify/lua-nginx-module/pull/1.patch","issue_url":"https://api.github.com/repos/Shopify/lua-nginx-module/issues/1","number":1,"state":"open","locked":false,"title":"Skip setting multi-value headers for bad requests","user":{"login":"es","id":2137369,"avatar_url":"https://avatars.githubusercontent.com/u/2137369?v=3","gravatar_id":"","url":"https://api.github.com/users/es","html_url":"https://github.com/es","followers_url":"https://api.github.com/users/es/followers","following_url":"https://api.github.com/users/es/following{/other_user}","gists_url":"https://api.github.com/users/es/gists{/gist_id}","starred_url":"https://api.github.com/users/es/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/es/subscriptions","organizations_url":"https://api.github.com/users/es/orgs","repos_url":"https://api.github.com/users/es/repos","events_url":"https://api.github.com/users/es/events{/privacy}","received_events_url":"https://api.github.com/users/es/received_events","type":"User","site_admin":false},"body":"Opening this PR so we can build an Nginx with this patch until https://github.com/openresty/lua-nginx-module/pull/844 is merged.\r\n\r\n**Description**:\r\nWhen setting a multi-value header during bad requests, the value isn't added into the header's array. Despite failing to be set, the size of the array is [still incremented](https://github.com/openresty/lua-nginx-module/blob/7d242ff79a63bae15c8f5f68999dfe5f4da7cf67/src/ngx_http_lua_headers_in.c#L624). Later, if Nginx attempts to [iterate over the array](https://github.com/nginx/nginx/blob/8d0b75f716f3ef2c33d277f70f45fbc1e0ca31fe/src/http/ngx_http_parse.c#L1922-L1931), a segfault will occur.\r\n\r\ne21d9b5 established a pattern of silently ignoring the header being set. I've moved the check for a bad request into `ngx_http_lua_set_input_header` so that setting a header value is ignored for both types of headers.\r\n\r\n\r\nr: @shivnagarajan @pushrax @stefanmb @fbogsany @csfrancis","created_at":"2016-08-22T20:40:42Z","updated_at":"2016-08-22T20:40:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9e593b582f35cfba6a3ca1b1fa155bcd09e89588","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Shopify/lua-nginx-module/pulls/1/commits","review_comments_url":"https://api.github.com/repos/Shopify/lua-nginx-module/pulls/1/comments","review_comment_url":"https://api.github.com/repos/Shopify/lua-nginx-module/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Shopify/lua-nginx-module/issues/1/comments","statuses_url":"https://api.github.com/repos/Shopify/lua-nginx-module/statuses/37f45b909cd9c91a15fd52a436b0a9b7a2b47e06","head":{"label":"es:segfault-due-to-bad-request","ref":"segfault-due-to-bad-request","sha":"37f45b909cd9c91a15fd52a436b0a9b7a2b47e06","user":{"login":"es","id":2137369,"avatar_url":"https://avatars.githubusercontent.com/u/2137369?v=3","gravatar_id":"","url":"https://api.github.com/users/es","html_url":"https://github.com/es","followers_url":"https://api.github.com/users/es/followers","following_url":"https://api.github.com/users/es/following{/other_user}","gists_url":"https://api.github.com/users/es/gists{/gist_id}","starred_url":"https://api.github.com/users/es/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/es/subscriptions","organizations_url":"https://api.github.com/users/es/orgs","repos_url":"https://api.github.com/users/es/repos","events_url":"https://api.github.com/users/es/events{/privacy}","received_events_url":"https://api.github.com/users/es/received_events","type":"User","site_admin":false},"repo":{"id":58836038,"name":"lua-nginx-module","full_name":"es/lua-nginx-module","owner":{"login":"es","id":2137369,"avatar_url":"https://avatars.githubusercontent.com/u/2137369?v=3","gravatar_id":"","url":"https://api.github.com/users/es","html_url":"https://github.com/es","followers_url":"https://api.github.com/users/es/followers","following_url":"https://api.github.com/users/es/following{/other_user}","gists_url":"https://api.github.com/users/es/gists{/gist_id}","starred_url":"https://api.github.com/users/es/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/es/subscriptions","organizations_url":"https://api.github.com/users/es/orgs","repos_url":"https://api.github.com/users/es/repos","events_url":"https://api.github.com/users/es/events{/privacy}","received_events_url":"https://api.github.com/users/es/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/es/lua-nginx-module","description":"Embed the Power of Lua into NGINX HTTP servers","fork":true,"url":"https://api.github.com/repos/es/lua-nginx-module","forks_url":"https://api.github.com/repos/es/lua-nginx-module/forks","keys_url":"https://api.github.com/repos/es/lua-nginx-module/keys{/key_id}","collaborators_url":"https://api.github.com/repos/es/lua-nginx-module/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/es/lua-nginx-module/teams","hooks_url":"https://api.github.com/repos/es/lua-nginx-module/hooks","issue_events_url":"https://api.github.com/repos/es/lua-nginx-module/issues/events{/number}","events_url":"https://api.github.com/repos/es/lua-nginx-module/events","assignees_url":"https://api.github.com/repos/es/lua-nginx-module/assignees{/user}","branches_url":"https://api.github.com/repos/es/lua-nginx-module/branches{/branch}","tags_url":"https://api.github.com/repos/es/lua-nginx-module/tags","blobs_url":"https://api.github.com/repos/es/lua-nginx-module/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/es/lua-nginx-module/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/es/lua-nginx-module/git/refs{/sha}","trees_url":"https://api.github.com/repos/es/lua-nginx-module/git/trees{/sha}","statuses_url":"https://api.github.com/repos/es/lua-nginx-module/statuses/{sha}","languages_url":"https://api.github.com/repos/es/lua-nginx-module/languages","stargazers_url":"https://api.github.com/repos/es/lua-nginx-module/stargazers","contributors_url":"https://api.github.com/repos/es/lua-nginx-module/contributors","subscribers_url":"https://api.github.com/repos/es/lua-nginx-module/subscribers","subscription_url":"https://api.github.com/repos/es/lua-nginx-module/subscription","commits_url":"https://api.github.com/repos/es/lua-nginx-module/commits{/sha}","git_commits_url":"https://api.github.com/repos/es/lua-nginx-module/git/commits{/sha}","comments_url":"https://api.github.com/repos/es/lua-nginx-module/comments{/number}","issue_comment_url":"https://api.github.com/repos/es/lua-nginx-module/issues/comments{/number}","contents_url":"https://api.github.com/repos/es/lua-nginx-module/contents/{+path}","compare_url":"https://api.github.com/repos/es/lua-nginx-module/compare/{base}...{head}","merges_url":"https://api.github.com/repos/es/lua-nginx-module/merges","archive_url":"https://api.github.com/repos/es/lua-nginx-module/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/es/lua-nginx-module/downloads","issues_url":"https://api.github.com/repos/es/lua-nginx-module/issues{/number}","pulls_url":"https://api.github.com/repos/es/lua-nginx-module/pulls{/number}","milestones_url":"https://api.github.com/repos/es/lua-nginx-module/milestones{/number}","notifications_url":"https://api.github.com/repos/es/lua-nginx-module/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/es/lua-nginx-module/labels{/name}","releases_url":"https://api.github.com/repos/es/lua-nginx-module/releases{/id}","deployments_url":"https://api.github.com/repos/es/lua-nginx-module/deployments","created_at":"2016-05-15T00:11:01Z","updated_at":"2016-05-15T00:11:03Z","pushed_at":"2016-08-22T15:36:53Z","git_url":"git://github.com/es/lua-nginx-module.git","ssh_url":"git@github.com:es/lua-nginx-module.git","clone_url":"https://github.com/es/lua-nginx-module.git","svn_url":"https://github.com/es/lua-nginx-module","homepage":"https://openresty.org/","size":11612,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Shopify:master","ref":"master","sha":"7d242ff79a63bae15c8f5f68999dfe5f4da7cf67","user":{"login":"Shopify","id":8085,"avatar_url":"https://avatars.githubusercontent.com/u/8085?v=3","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"repo":{"id":66299958,"name":"lua-nginx-module","full_name":"Shopify/lua-nginx-module","owner":{"login":"Shopify","id":8085,"avatar_url":"https://avatars.githubusercontent.com/u/8085?v=3","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Shopify/lua-nginx-module","description":"Embed the Power of Lua into NGINX HTTP servers","fork":true,"url":"https://api.github.com/repos/Shopify/lua-nginx-module","forks_url":"https://api.github.com/repos/Shopify/lua-nginx-module/forks","keys_url":"https://api.github.com/repos/Shopify/lua-nginx-module/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Shopify/lua-nginx-module/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Shopify/lua-nginx-module/teams","hooks_url":"https://api.github.com/repos/Shopify/lua-nginx-module/hooks","issue_events_url":"https://api.github.com/repos/Shopify/lua-nginx-module/issues/events{/number}","events_url":"https://api.github.com/repos/Shopify/lua-nginx-module/events","assignees_url":"https://api.github.com/repos/Shopify/lua-nginx-module/assignees{/user}","branches_url":"https://api.github.com/repos/Shopify/lua-nginx-module/branches{/branch}","tags_url":"https://api.github.com/repos/Shopify/lua-nginx-module/tags","blobs_url":"https://api.github.com/repos/Shopify/lua-nginx-module/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Shopify/lua-nginx-module/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Shopify/lua-nginx-module/git/refs{/sha}","trees_url":"https://api.github.com/repos/Shopify/lua-nginx-module/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Shopify/lua-nginx-module/statuses/{sha}","languages_url":"https://api.github.com/repos/Shopify/lua-nginx-module/languages","stargazers_url":"https://api.github.com/repos/Shopify/lua-nginx-module/stargazers","contributors_url":"https://api.github.com/repos/Shopify/lua-nginx-module/contributors","subscribers_url":"https://api.github.com/repos/Shopify/lua-nginx-module/subscribers","subscription_url":"https://api.github.com/repos/Shopify/lua-nginx-module/subscription","commits_url":"https://api.github.com/repos/Shopify/lua-nginx-module/commits{/sha}","git_commits_url":"https://api.github.com/repos/Shopify/lua-nginx-module/git/commits{/sha}","comments_url":"https://api.github.com/repos/Shopify/lua-nginx-module/comments{/number}","issue_comment_url":"https://api.github.com/repos/Shopify/lua-nginx-module/issues/comments{/number}","contents_url":"https://api.github.com/repos/Shopify/lua-nginx-module/contents/{+path}","compare_url":"https://api.github.com/repos/Shopify/lua-nginx-module/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Shopify/lua-nginx-module/merges","archive_url":"https://api.github.com/repos/Shopify/lua-nginx-module/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Shopify/lua-nginx-module/downloads","issues_url":"https://api.github.com/repos/Shopify/lua-nginx-module/issues{/number}","pulls_url":"https://api.github.com/repos/Shopify/lua-nginx-module/pulls{/number}","milestones_url":"https://api.github.com/repos/Shopify/lua-nginx-module/milestones{/number}","notifications_url":"https://api.github.com/repos/Shopify/lua-nginx-module/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Shopify/lua-nginx-module/labels{/name}","releases_url":"https://api.github.com/repos/Shopify/lua-nginx-module/releases{/id}","deployments_url":"https://api.github.com/repos/Shopify/lua-nginx-module/deployments","created_at":"2016-08-22T18:59:39Z","updated_at":"2016-08-22T18:59:42Z","pushed_at":"2016-08-22T20:40:43Z","git_url":"git://github.com/Shopify/lua-nginx-module.git","ssh_url":"git@github.com:Shopify/lua-nginx-module.git","clone_url":"https://github.com/Shopify/lua-nginx-module.git","svn_url":"https://github.com/Shopify/lua-nginx-module","homepage":"https://openresty.org/","size":15303,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Shopify/lua-nginx-module/pulls/1"},"html":{"href":"https://github.com/Shopify/lua-nginx-module/pull/1"},"issue":{"href":"https://api.github.com/repos/Shopify/lua-nginx-module/issues/1"},"comments":{"href":"https://api.github.com/repos/Shopify/lua-nginx-module/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/Shopify/lua-nginx-module/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/Shopify/lua-nginx-module/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Shopify/lua-nginx-module/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/Shopify/lua-nginx-module/statuses/37f45b909cd9c91a15fd52a436b0a9b7a2b47e06"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":27,"deletions":6,"changed_files":2}}
{"actor":{"display_login":"es"}}