{"action":"created","comment":{"url":"https://api.github.com/repos/php/php-src/pulls/comments/31399302","id":31399302,"diff_hunk":"@@ -221,6 +221,41 @@ void php_mail_log_to_file(char *filename, char *message, size_t message_size TSR\n }\n \n \n+static int php_mail_detect_multiple_crlf(char *hdr) {\n+\t/* This function detects malformed multiple newlines also */\n+\tchar *tmp = hdr;\n+\n+\t/* Should not have any newlines at the beginning */\n+\twhile (*hdr && (*hdr == '\\n' || *hdr == '\\r')) {\n+\t\thdr++;\n+\t}\n+\tif (tmp != hdr) {\n+\t\treturn 1;\n+\t}\n+\n+\twhile(*hdr) {\n+\t\tif (*hdr == '\\r') {\n+\t\t\tif (*(hdr+1) == '\\r' || (*(hdr+1) == '\\n' && (*(hdr+2) == '\\n' || *(hdr+2) == '\\r'))) {\n+\t\t\t\t/* Malformed or multiple newlines */\n+\t\t\t\treturn 1;\n+\t\t\t} else {\n+\t\t\t\thdr += 2;","path":"ext/standard/mail.c","position":22,"original_position":22,"commit_id":"8fd3c7be510dc190f8d03c0eb1d87d10f6711a6c","original_commit_id":"8fd3c7be510dc190f8d03c0eb1d87d10f6711a6c","user":{"login":"yohgaki","id":118485,"avatar_url":"https://avatars.githubusercontent.com/u/118485?v=3","gravatar_id":"","url":"https://api.github.com/users/yohgaki","html_url":"https://github.com/yohgaki","followers_url":"https://api.github.com/users/yohgaki/followers","following_url":"https://api.github.com/users/yohgaki/following{/other_user}","gists_url":"https://api.github.com/users/yohgaki/gists{/gist_id}","starred_url":"https://api.github.com/users/yohgaki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yohgaki/subscriptions","organizations_url":"https://api.github.com/users/yohgaki/orgs","repos_url":"https://api.github.com/users/yohgaki/repos","events_url":"https://api.github.com/users/yohgaki/events{/privacy}","received_events_url":"https://api.github.com/users/yohgaki/received_events","type":"User","site_admin":false},"body":"Right. I'm being sloppy here by assuming caller trimmed leading/ending \\r, \\n.\r\nI may get rid of this assumption and previously applied trim code.","created_at":"2015-06-01T03:31:51Z","updated_at":"2015-06-01T03:31:51Z","html_url":"https://github.com/php/php-src/pull/1273#discussion_r31399302","pull_request_url":"https://api.github.com/repos/php/php-src/pulls/1273","_links":{"self":{"href":"https://api.github.com/repos/php/php-src/pulls/comments/31399302"},"html":{"href":"https://github.com/php/php-src/pull/1273#discussion_r31399302"},"pull_request":{"href":"https://api.github.com/repos/php/php-src/pulls/1273"}}},"pull_request":{"url":"https://api.github.com/repos/php/php-src/pulls/1273","id":35284097,"html_url":"https://github.com/php/php-src/pull/1273","diff_url":"https://github.com/php/php-src/pull/1273.diff","patch_url":"https://github.com/php/php-src/pull/1273.patch","issue_url":"https://api.github.com/repos/php/php-src/issues/1273","number":1273,"state":"open","locked":false,"title":"Fixed bug #68776","user":{"login":"yohgaki","id":118485,"avatar_url":"https://avatars.githubusercontent.com/u/118485?v=3","gravatar_id":"","url":"https://api.github.com/users/yohgaki","html_url":"https://github.com/yohgaki","followers_url":"https://api.github.com/users/yohgaki/followers","following_url":"https://api.github.com/users/yohgaki/following{/other_user}","gists_url":"https://api.github.com/users/yohgaki/gists{/gist_id}","starred_url":"https://api.github.com/users/yohgaki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yohgaki/subscriptions","organizations_url":"https://api.github.com/users/yohgaki/orgs","repos_url":"https://api.github.com/users/yohgaki/repos","events_url":"https://api.github.com/users/yohgaki/events{/privacy}","received_events_url":"https://api.github.com/users/yohgaki/received_events","type":"User","site_admin":false},"body":"https://bugs.php.net/bug.php?id=68776","created_at":"2015-05-13T00:21:18Z","updated_at":"2015-06-01T03:31:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c9b56254e35fa80732bb28fea7adeec8dc916316","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/php/php-src/pulls/1273/commits","review_comments_url":"https://api.github.com/repos/php/php-src/pulls/1273/comments","review_comment_url":"https://api.github.com/repos/php/php-src/pulls/comments{/number}","comments_url":"https://api.github.com/repos/php/php-src/issues/1273/comments","statuses_url":"https://api.github.com/repos/php/php-src/statuses/8fd3c7be510dc190f8d03c0eb1d87d10f6711a6c","head":{"label":"yohgaki:PHP-5.4-bug68776","ref":"PHP-5.4-bug68776","sha":"8fd3c7be510dc190f8d03c0eb1d87d10f6711a6c","user":{"login":"yohgaki","id":118485,"avatar_url":"https://avatars.githubusercontent.com/u/118485?v=3","gravatar_id":"","url":"https://api.github.com/users/yohgaki","html_url":"https://github.com/yohgaki","followers_url":"https://api.github.com/users/yohgaki/followers","following_url":"https://api.github.com/users/yohgaki/following{/other_user}","gists_url":"https://api.github.com/users/yohgaki/gists{/gist_id}","starred_url":"https://api.github.com/users/yohgaki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yohgaki/subscriptions","organizations_url":"https://api.github.com/users/yohgaki/orgs","repos_url":"https://api.github.com/users/yohgaki/repos","events_url":"https://api.github.com/users/yohgaki/events{/privacy}","received_events_url":"https://api.github.com/users/yohgaki/received_events","type":"User","site_admin":false},"repo":{"id":7073776,"name":"php-src","full_name":"yohgaki/php-src","owner":{"login":"yohgaki","id":118485,"avatar_url":"https://avatars.githubusercontent.com/u/118485?v=3","gravatar_id":"","url":"https://api.github.com/users/yohgaki","html_url":"https://github.com/yohgaki","followers_url":"https://api.github.com/users/yohgaki/followers","following_url":"https://api.github.com/users/yohgaki/following{/other_user}","gists_url":"https://api.github.com/users/yohgaki/gists{/gist_id}","starred_url":"https://api.github.com/users/yohgaki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yohgaki/subscriptions","organizations_url":"https://api.github.com/users/yohgaki/orgs","repos_url":"https://api.github.com/users/yohgaki/repos","events_url":"https://api.github.com/users/yohgaki/events{/privacy}","received_events_url":"https://api.github.com/users/yohgaki/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yohgaki/php-src","description":"The PHP Interpreter","fork":true,"url":"https://api.github.com/repos/yohgaki/php-src","forks_url":"https://api.github.com/repos/yohgaki/php-src/forks","keys_url":"https://api.github.com/repos/yohgaki/php-src/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yohgaki/php-src/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yohgaki/php-src/teams","hooks_url":"https://api.github.com/repos/yohgaki/php-src/hooks","issue_events_url":"https://api.github.com/repos/yohgaki/php-src/issues/events{/number}","events_url":"https://api.github.com/repos/yohgaki/php-src/events","assignees_url":"https://api.github.com/repos/yohgaki/php-src/assignees{/user}","branches_url":"https://api.github.com/repos/yohgaki/php-src/branches{/branch}","tags_url":"https://api.github.com/repos/yohgaki/php-src/tags","blobs_url":"https://api.github.com/repos/yohgaki/php-src/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yohgaki/php-src/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yohgaki/php-src/git/refs{/sha}","trees_url":"https://api.github.com/repos/yohgaki/php-src/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yohgaki/php-src/statuses/{sha}","languages_url":"https://api.github.com/repos/yohgaki/php-src/languages","stargazers_url":"https://api.github.com/repos/yohgaki/php-src/stargazers","contributors_url":"https://api.github.com/repos/yohgaki/php-src/contributors","subscribers_url":"https://api.github.com/repos/yohgaki/php-src/subscribers","subscription_url":"https://api.github.com/repos/yohgaki/php-src/subscription","commits_url":"https://api.github.com/repos/yohgaki/php-src/commits{/sha}","git_commits_url":"https://api.github.com/repos/yohgaki/php-src/git/commits{/sha}","comments_url":"https://api.github.com/repos/yohgaki/php-src/comments{/number}","issue_comment_url":"https://api.github.com/repos/yohgaki/php-src/issues/comments{/number}","contents_url":"https://api.github.com/repos/yohgaki/php-src/contents/{+path}","compare_url":"https://api.github.com/repos/yohgaki/php-src/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yohgaki/php-src/merges","archive_url":"https://api.github.com/repos/yohgaki/php-src/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yohgaki/php-src/downloads","issues_url":"https://api.github.com/repos/yohgaki/php-src/issues{/number}","pulls_url":"https://api.github.com/repos/yohgaki/php-src/pulls{/number}","milestones_url":"https://api.github.com/repos/yohgaki/php-src/milestones{/number}","notifications_url":"https://api.github.com/repos/yohgaki/php-src/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yohgaki/php-src/labels{/name}","releases_url":"https://api.github.com/repos/yohgaki/php-src/releases{/id}","created_at":"2012-12-09T00:14:22Z","updated_at":"2015-04-24T02:42:33Z","pushed_at":"2015-05-13T06:13:28Z","git_url":"git://github.com/yohgaki/php-src.git","ssh_url":"git@github.com:yohgaki/php-src.git","clone_url":"https://github.com/yohgaki/php-src.git","svn_url":"https://github.com/yohgaki/php-src","homepage":"http://www.php.net","size":233487,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"php:PHP-5.4","ref":"PHP-5.4","sha":"f473ea5464361848f6fc45a8456c78de6d9f53c6","user":{"login":"php","id":25158,"avatar_url":"https://avatars.githubusercontent.com/u/25158?v=3","gravatar_id":"","url":"https://api.github.com/users/php","html_url":"https://github.com/php","followers_url":"https://api.github.com/users/php/followers","following_url":"https://api.github.com/users/php/following{/other_user}","gists_url":"https://api.github.com/users/php/gists{/gist_id}","starred_url":"https://api.github.com/users/php/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/php/subscriptions","organizations_url":"https://api.github.com/users/php/orgs","repos_url":"https://api.github.com/users/php/repos","events_url":"https://api.github.com/users/php/events{/privacy}","received_events_url":"https://api.github.com/users/php/received_events","type":"Organization","site_admin":false},"repo":{"id":1903522,"name":"php-src","full_name":"php/php-src","owner":{"login":"php","id":25158,"avatar_url":"https://avatars.githubusercontent.com/u/25158?v=3","gravatar_id":"","url":"https://api.github.com/users/php","html_url":"https://github.com/php","followers_url":"https://api.github.com/users/php/followers","following_url":"https://api.github.com/users/php/following{/other_user}","gists_url":"https://api.github.com/users/php/gists{/gist_id}","starred_url":"https://api.github.com/users/php/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/php/subscriptions","organizations_url":"https://api.github.com/users/php/orgs","repos_url":"https://api.github.com/users/php/repos","events_url":"https://api.github.com/users/php/events{/privacy}","received_events_url":"https://api.github.com/users/php/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/php/php-src","description":"The PHP Interpreter","fork":false,"url":"https://api.github.com/repos/php/php-src","forks_url":"https://api.github.com/repos/php/php-src/forks","keys_url":"https://api.github.com/repos/php/php-src/keys{/key_id}","collaborators_url":"https://api.github.com/repos/php/php-src/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/php/php-src/teams","hooks_url":"https://api.github.com/repos/php/php-src/hooks","issue_events_url":"https://api.github.com/repos/php/php-src/issues/events{/number}","events_url":"https://api.github.com/repos/php/php-src/events","assignees_url":"https://api.github.com/repos/php/php-src/assignees{/user}","branches_url":"https://api.github.com/repos/php/php-src/branches{/branch}","tags_url":"https://api.github.com/repos/php/php-src/tags","blobs_url":"https://api.github.com/repos/php/php-src/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/php/php-src/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/php/php-src/git/refs{/sha}","trees_url":"https://api.github.com/repos/php/php-src/git/trees{/sha}","statuses_url":"https://api.github.com/repos/php/php-src/statuses/{sha}","languages_url":"https://api.github.com/repos/php/php-src/languages","stargazers_url":"https://api.github.com/repos/php/php-src/stargazers","contributors_url":"https://api.github.com/repos/php/php-src/contributors","subscribers_url":"https://api.github.com/repos/php/php-src/subscribers","subscription_url":"https://api.github.com/repos/php/php-src/subscription","commits_url":"https://api.github.com/repos/php/php-src/commits{/sha}","git_commits_url":"https://api.github.com/repos/php/php-src/git/commits{/sha}","comments_url":"https://api.github.com/repos/php/php-src/comments{/number}","issue_comment_url":"https://api.github.com/repos/php/php-src/issues/comments{/number}","contents_url":"https://api.github.com/repos/php/php-src/contents/{+path}","compare_url":"https://api.github.com/repos/php/php-src/compare/{base}...{head}","merges_url":"https://api.github.com/repos/php/php-src/merges","archive_url":"https://api.github.com/repos/php/php-src/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/php/php-src/downloads","issues_url":"https://api.github.com/repos/php/php-src/issues{/number}","pulls_url":"https://api.github.com/repos/php/php-src/pulls{/number}","milestones_url":"https://api.github.com/repos/php/php-src/milestones{/number}","notifications_url":"https://api.github.com/repos/php/php-src/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/php/php-src/labels{/name}","releases_url":"https://api.github.com/repos/php/php-src/releases{/id}","created_at":"2011-06-16T01:52:25Z","updated_at":"2015-06-01T03:14:49Z","pushed_at":"2015-06-01T02:40:45Z","git_url":"git://github.com/php/php-src.git","ssh_url":"git@github.com:php/php-src.git","clone_url":"https://github.com/php/php-src.git","svn_url":"https://github.com/php/php-src","homepage":"http://www.php.net","size":4021333,"stargazers_count":5955,"watchers_count":5955,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2156,"mirror_url":null,"open_issues_count":198,"forks":2156,"open_issues":198,"watchers":5955,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/php/php-src/pulls/1273"},"html":{"href":"https://github.com/php/php-src/pull/1273"},"issue":{"href":"https://api.github.com/repos/php/php-src/issues/1273"},"comments":{"href":"https://api.github.com/repos/php/php-src/issues/1273/comments"},"review_comments":{"href":"https://api.github.com/repos/php/php-src/pulls/1273/comments"},"review_comment":{"href":"https://api.github.com/repos/php/php-src/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/php/php-src/pulls/1273/commits"},"statuses":{"href":"https://api.github.com/repos/php/php-src/statuses/8fd3c7be510dc190f8d03c0eb1d87d10f6711a6c"}}}}