{"action":"created","comment":{"url":"https://api.github.com/repos/nodejs/node/pulls/comments/83052696","pull_request_review_id":3918546,"id":83052696,"diff_hunk":"@@ -3258,25 +3258,21 @@ void CipherBase::InitIv(const char* cipher_type,\n     return env()->ThrowError(\"Unknown cipher\");\n   }\n \n-  /* OpenSSL versions up to 0.9.8l failed to return the correct\n-     iv_length (0) for ECB ciphers */\n-  if (EVP_CIPHER_iv_length(cipher_) != iv_len &&\n-      !(EVP_CIPHER_mode(cipher_) == EVP_CIPH_ECB_MODE && iv_len == 0) &&\n-      !(EVP_CIPHER_mode(cipher_) == EVP_CIPH_GCM_MODE) && iv_len > 0) {\n+  const int expected_iv_len = EVP_CIPHER_iv_length(cipher_);\n+  const bool is_gcm_mode = (EVP_CIPH_GCM_MODE == EVP_CIPHER_mode(cipher_));\n+\n+  if (is_gcm_mode == false && iv_len != expected_iv_len) {","path":"src/node_crypto.cc","position":12,"original_position":12,"commit_id":"d2780b249d3e28d3b9fa87ef60cf9e3a6569ce7c","original_commit_id":"d2780b249d3e28d3b9fa87ef60cf9e3a6569ce7c","user":{"login":"bnoordhuis","id":275871,"avatar_url":"https://avatars.githubusercontent.com/u/275871?v=3","gravatar_id":"","url":"https://api.github.com/users/bnoordhuis","html_url":"https://github.com/bnoordhuis","followers_url":"https://api.github.com/users/bnoordhuis/followers","following_url":"https://api.github.com/users/bnoordhuis/following{/other_user}","gists_url":"https://api.github.com/users/bnoordhuis/gists{/gist_id}","starred_url":"https://api.github.com/users/bnoordhuis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bnoordhuis/subscriptions","organizations_url":"https://api.github.com/users/bnoordhuis/orgs","repos_url":"https://api.github.com/users/bnoordhuis/repos","events_url":"https://api.github.com/users/bnoordhuis/events{/privacy}","received_events_url":"https://api.github.com/users/bnoordhuis/received_events","type":"User","site_admin":false},"body":"Believe it or not, I chose not to use that because `!i` is not very distinct in some fonts.","created_at":"2016-10-12T17:09:07Z","updated_at":"2016-10-12T17:09:07Z","html_url":"https://github.com/nodejs/node/pull/9032#discussion_r83052696","pull_request_url":"https://api.github.com/repos/nodejs/node/pulls/9032","_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments/83052696"},"html":{"href":"https://github.com/nodejs/node/pull/9032#discussion_r83052696"},"pull_request":{"href":"https://api.github.com/repos/nodejs/node/pulls/9032"}}},"pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/9032","id":88886395,"html_url":"https://github.com/nodejs/node/pull/9032","diff_url":"https://github.com/nodejs/node/pull/9032.diff","patch_url":"https://github.com/nodejs/node/pull/9032.patch","issue_url":"https://api.github.com/repos/nodejs/node/issues/9032","number":9032,"state":"open","locked":false,"title":"crypto: fix faulty logic in iv size check","user":{"login":"bnoordhuis","id":275871,"avatar_url":"https://avatars.githubusercontent.com/u/275871?v=3","gravatar_id":"","url":"https://api.github.com/users/bnoordhuis","html_url":"https://github.com/bnoordhuis","followers_url":"https://api.github.com/users/bnoordhuis/followers","following_url":"https://api.github.com/users/bnoordhuis/following{/other_user}","gists_url":"https://api.github.com/users/bnoordhuis/gists{/gist_id}","starred_url":"https://api.github.com/users/bnoordhuis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bnoordhuis/subscriptions","organizations_url":"https://api.github.com/users/bnoordhuis/orgs","repos_url":"https://api.github.com/users/bnoordhuis/repos","events_url":"https://api.github.com/users/bnoordhuis/events{/privacy}","received_events_url":"https://api.github.com/users/bnoordhuis/received_events","type":"User","site_admin":false},"body":"Fix a regression introduced in commit 2996b5c (\"crypto: Allow GCM\r\nciphers to have a longer IV length\") from April 2016 where a misplaced\r\nparenthesis in a 'is ECB cipher?' check made it possible to use empty\r\nIVs with non-ECB ciphers.\r\n\r\nRefs: #6376\r\nRefs: #9024\r\n\r\nR=@nodejs/crypto @addaleax","created_at":"2016-10-11T18:35:31Z","updated_at":"2016-10-12T17:09:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5058ca2dc3ac97f99e04f766fad059861abba384","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/nodejs/node/pulls/9032/commits","review_comments_url":"https://api.github.com/repos/nodejs/node/pulls/9032/comments","review_comment_url":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nodejs/node/issues/9032/comments","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/d2780b249d3e28d3b9fa87ef60cf9e3a6569ce7c","head":{"label":"bnoordhuis:fix9024","ref":"fix9024","sha":"d2780b249d3e28d3b9fa87ef60cf9e3a6569ce7c","user":{"login":"bnoordhuis","id":275871,"avatar_url":"https://avatars.githubusercontent.com/u/275871?v=3","gravatar_id":"","url":"https://api.github.com/users/bnoordhuis","html_url":"https://github.com/bnoordhuis","followers_url":"https://api.github.com/users/bnoordhuis/followers","following_url":"https://api.github.com/users/bnoordhuis/following{/other_user}","gists_url":"https://api.github.com/users/bnoordhuis/gists{/gist_id}","starred_url":"https://api.github.com/users/bnoordhuis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bnoordhuis/subscriptions","organizations_url":"https://api.github.com/users/bnoordhuis/orgs","repos_url":"https://api.github.com/users/bnoordhuis/repos","events_url":"https://api.github.com/users/bnoordhuis/events{/privacy}","received_events_url":"https://api.github.com/users/bnoordhuis/received_events","type":"User","site_admin":false},"repo":{"id":27560441,"name":"io.js","full_name":"bnoordhuis/io.js","owner":{"login":"bnoordhuis","id":275871,"avatar_url":"https://avatars.githubusercontent.com/u/275871?v=3","gravatar_id":"","url":"https://api.github.com/users/bnoordhuis","html_url":"https://github.com/bnoordhuis","followers_url":"https://api.github.com/users/bnoordhuis/followers","following_url":"https://api.github.com/users/bnoordhuis/following{/other_user}","gists_url":"https://api.github.com/users/bnoordhuis/gists{/gist_id}","starred_url":"https://api.github.com/users/bnoordhuis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bnoordhuis/subscriptions","organizations_url":"https://api.github.com/users/bnoordhuis/orgs","repos_url":"https://api.github.com/users/bnoordhuis/repos","events_url":"https://api.github.com/users/bnoordhuis/events{/privacy}","received_events_url":"https://api.github.com/users/bnoordhuis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bnoordhuis/io.js","description":"Evented IO for V8 JavaScript","fork":true,"url":"https://api.github.com/repos/bnoordhuis/io.js","forks_url":"https://api.github.com/repos/bnoordhuis/io.js/forks","keys_url":"https://api.github.com/repos/bnoordhuis/io.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bnoordhuis/io.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bnoordhuis/io.js/teams","hooks_url":"https://api.github.com/repos/bnoordhuis/io.js/hooks","issue_events_url":"https://api.github.com/repos/bnoordhuis/io.js/issues/events{/number}","events_url":"https://api.github.com/repos/bnoordhuis/io.js/events","assignees_url":"https://api.github.com/repos/bnoordhuis/io.js/assignees{/user}","branches_url":"https://api.github.com/repos/bnoordhuis/io.js/branches{/branch}","tags_url":"https://api.github.com/repos/bnoordhuis/io.js/tags","blobs_url":"https://api.github.com/repos/bnoordhuis/io.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bnoordhuis/io.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bnoordhuis/io.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/bnoordhuis/io.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bnoordhuis/io.js/statuses/{sha}","languages_url":"https://api.github.com/repos/bnoordhuis/io.js/languages","stargazers_url":"https://api.github.com/repos/bnoordhuis/io.js/stargazers","contributors_url":"https://api.github.com/repos/bnoordhuis/io.js/contributors","subscribers_url":"https://api.github.com/repos/bnoordhuis/io.js/subscribers","subscription_url":"https://api.github.com/repos/bnoordhuis/io.js/subscription","commits_url":"https://api.github.com/repos/bnoordhuis/io.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/bnoordhuis/io.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/bnoordhuis/io.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/bnoordhuis/io.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/bnoordhuis/io.js/contents/{+path}","compare_url":"https://api.github.com/repos/bnoordhuis/io.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bnoordhuis/io.js/merges","archive_url":"https://api.github.com/repos/bnoordhuis/io.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bnoordhuis/io.js/downloads","issues_url":"https://api.github.com/repos/bnoordhuis/io.js/issues{/number}","pulls_url":"https://api.github.com/repos/bnoordhuis/io.js/pulls{/number}","milestones_url":"https://api.github.com/repos/bnoordhuis/io.js/milestones{/number}","notifications_url":"https://api.github.com/repos/bnoordhuis/io.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bnoordhuis/io.js/labels{/name}","releases_url":"https://api.github.com/repos/bnoordhuis/io.js/releases{/id}","deployments_url":"https://api.github.com/repos/bnoordhuis/io.js/deployments","created_at":"2014-12-04T21:15:25Z","updated_at":"2016-05-27T21:51:20Z","pushed_at":"2016-10-12T13:34:08Z","git_url":"git://github.com/bnoordhuis/io.js.git","ssh_url":"git@github.com:bnoordhuis/io.js.git","clone_url":"https://github.com/bnoordhuis/io.js.git","svn_url":"https://github.com/bnoordhuis/io.js","homepage":null,"size":231364,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":4,"default_branch":"v0.12"}},"base":{"label":"nodejs:master","ref":"master","sha":"499d058789d5792edff9beafccf640a81dbed8a1","user":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars.githubusercontent.com/u/9950313?v=3","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"repo":{"id":27193779,"name":"node","full_name":"nodejs/node","owner":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars.githubusercontent.com/u/9950313?v=3","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nodejs/node","description":"Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:","fork":false,"url":"https://api.github.com/repos/nodejs/node","forks_url":"https://api.github.com/repos/nodejs/node/forks","keys_url":"https://api.github.com/repos/nodejs/node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nodejs/node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nodejs/node/teams","hooks_url":"https://api.github.com/repos/nodejs/node/hooks","issue_events_url":"https://api.github.com/repos/nodejs/node/issues/events{/number}","events_url":"https://api.github.com/repos/nodejs/node/events","assignees_url":"https://api.github.com/repos/nodejs/node/assignees{/user}","branches_url":"https://api.github.com/repos/nodejs/node/branches{/branch}","tags_url":"https://api.github.com/repos/nodejs/node/tags","blobs_url":"https://api.github.com/repos/nodejs/node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nodejs/node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nodejs/node/git/refs{/sha}","trees_url":"https://api.github.com/repos/nodejs/node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/{sha}","languages_url":"https://api.github.com/repos/nodejs/node/languages","stargazers_url":"https://api.github.com/repos/nodejs/node/stargazers","contributors_url":"https://api.github.com/repos/nodejs/node/contributors","subscribers_url":"https://api.github.com/repos/nodejs/node/subscribers","subscription_url":"https://api.github.com/repos/nodejs/node/subscription","commits_url":"https://api.github.com/repos/nodejs/node/commits{/sha}","git_commits_url":"https://api.github.com/repos/nodejs/node/git/commits{/sha}","comments_url":"https://api.github.com/repos/nodejs/node/comments{/number}","issue_comment_url":"https://api.github.com/repos/nodejs/node/issues/comments{/number}","contents_url":"https://api.github.com/repos/nodejs/node/contents/{+path}","compare_url":"https://api.github.com/repos/nodejs/node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nodejs/node/merges","archive_url":"https://api.github.com/repos/nodejs/node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nodejs/node/downloads","issues_url":"https://api.github.com/repos/nodejs/node/issues{/number}","pulls_url":"https://api.github.com/repos/nodejs/node/pulls{/number}","milestones_url":"https://api.github.com/repos/nodejs/node/milestones{/number}","notifications_url":"https://api.github.com/repos/nodejs/node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nodejs/node/labels{/name}","releases_url":"https://api.github.com/repos/nodejs/node/releases{/id}","deployments_url":"https://api.github.com/repos/nodejs/node/deployments","created_at":"2014-11-26T19:57:11Z","updated_at":"2016-10-12T16:58:13Z","pushed_at":"2016-10-12T16:49:39Z","git_url":"git://github.com/nodejs/node.git","ssh_url":"git@github.com:nodejs/node.git","clone_url":"https://github.com/nodejs/node.git","svn_url":"https://github.com/nodejs/node","homepage":"https://nodejs.org","size":348926,"stargazers_count":27592,"watchers_count":27592,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4539,"mirror_url":null,"open_issues_count":838,"forks":4539,"open_issues":838,"watchers":27592,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/9032"},"html":{"href":"https://github.com/nodejs/node/pull/9032"},"issue":{"href":"https://api.github.com/repos/nodejs/node/issues/9032"},"comments":{"href":"https://api.github.com/repos/nodejs/node/issues/9032/comments"},"review_comments":{"href":"https://api.github.com/repos/nodejs/node/pulls/9032/comments"},"review_comment":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nodejs/node/pulls/9032/commits"},"statuses":{"href":"https://api.github.com/repos/nodejs/node/statuses/d2780b249d3e28d3b9fa87ef60cf9e3a6569ce7c"}}}}
{"actor":{"display_login":"bnoordhuis"}}