{"action":"created","comment":{"url":"https://api.github.com/repos/getlantern/go-update/pulls/comments/75571315","id":75571315,"diff_hunk":"@@ -338,8 +339,22 @@ func (u *Update) FromStream(updateWith io.Reader) (err error, errRecover error)\n \t\t\treturn\n \t\t}\n \tcase PATCHTYPE_NONE:\n-\t\t// no patch to apply, go on through (with bzip2 decoding).\n-\t\tnewBytes, err = ioutil.ReadAll(bzip2.NewReader(updateWith))\n+\t\t// no patch to apply, go on through\n+\t\tvar fileHeader []byte\n+\t\tbufBytes := bufio.NewReader(updateWith)\n+\t\tfileHeader, err = bufBytes.Peek(2)\n+\t\tif err != nil {\n+\t\t\treturn\n+\t\t}\n+\n+\t\tif bytes.Equal([]byte{0x42, 0x5a}, fileHeader) {","path":"update.go","position":22,"original_position":22,"commit_id":"53f79887535d8aa085037b3a36f53fa1ebf3d0ae","original_commit_id":"763329fb67a111851c282b715d5b0bedc832cc5b","user":{"login":"fffw","id":10410437,"avatar_url":"https://avatars.githubusercontent.com/u/10410437?v=3","gravatar_id":"","url":"https://api.github.com/users/fffw","html_url":"https://github.com/fffw","followers_url":"https://api.github.com/users/fffw/followers","following_url":"https://api.github.com/users/fffw/following{/other_user}","gists_url":"https://api.github.com/users/fffw/gists{/gist_id}","starred_url":"https://api.github.com/users/fffw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fffw/subscriptions","organizations_url":"https://api.github.com/users/fffw/orgs","repos_url":"https://api.github.com/users/fffw/repos","events_url":"https://api.github.com/users/fffw/events{/privacy}","received_events_url":"https://api.github.com/users/fffw/received_events","type":"User","site_admin":false},"body":"Ok cool. Then a comment would be worthy. I can add a one-line comment and merge. ","created_at":"2016-08-20T02:35:05Z","updated_at":"2016-08-20T02:35:05Z","html_url":"https://github.com/getlantern/go-update/pull/4#discussion_r75571315","pull_request_url":"https://api.github.com/repos/getlantern/go-update/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/getlantern/go-update/pulls/comments/75571315"},"html":{"href":"https://github.com/getlantern/go-update/pull/4#discussion_r75571315"},"pull_request":{"href":"https://api.github.com/repos/getlantern/go-update/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/getlantern/go-update/pulls/4","id":79670244,"html_url":"https://github.com/getlantern/go-update/pull/4","diff_url":"https://github.com/getlantern/go-update/pull/4.diff","patch_url":"https://github.com/getlantern/go-update/pull/4.patch","issue_url":"https://api.github.com/repos/getlantern/go-update/issues/4","number":4,"state":"open","locked":false,"title":"Add message validation","user":{"login":"xiam","id":385670,"avatar_url":"https://avatars.githubusercontent.com/u/385670?v=3","gravatar_id":"","url":"https://api.github.com/users/xiam","html_url":"https://github.com/xiam","followers_url":"https://api.github.com/users/xiam/followers","following_url":"https://api.github.com/users/xiam/following{/other_user}","gists_url":"https://api.github.com/users/xiam/gists{/gist_id}","starred_url":"https://api.github.com/users/xiam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiam/subscriptions","organizations_url":"https://api.github.com/users/xiam/orgs","repos_url":"https://api.github.com/users/xiam/repos","events_url":"https://api.github.com/users/xiam/events{/privacy}","received_events_url":"https://api.github.com/users/xiam/received_events","type":"User","site_admin":false},"body":"Prevents replay attack while keeping backwards compatibility with old clients. See https://github.com/getlantern/lantern-internal/issues/68","created_at":"2016-08-02T03:16:26Z","updated_at":"2016-08-20T02:35:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c4e8296173825d0a25af48c4e06adae59d08eb13","assignee":{"login":"fffw","id":10410437,"avatar_url":"https://avatars.githubusercontent.com/u/10410437?v=3","gravatar_id":"","url":"https://api.github.com/users/fffw","html_url":"https://github.com/fffw","followers_url":"https://api.github.com/users/fffw/followers","following_url":"https://api.github.com/users/fffw/following{/other_user}","gists_url":"https://api.github.com/users/fffw/gists{/gist_id}","starred_url":"https://api.github.com/users/fffw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fffw/subscriptions","organizations_url":"https://api.github.com/users/fffw/orgs","repos_url":"https://api.github.com/users/fffw/repos","events_url":"https://api.github.com/users/fffw/events{/privacy}","received_events_url":"https://api.github.com/users/fffw/received_events","type":"User","site_admin":false},"assignees":[{"login":"fffw","id":10410437,"avatar_url":"https://avatars.githubusercontent.com/u/10410437?v=3","gravatar_id":"","url":"https://api.github.com/users/fffw","html_url":"https://github.com/fffw","followers_url":"https://api.github.com/users/fffw/followers","following_url":"https://api.github.com/users/fffw/following{/other_user}","gists_url":"https://api.github.com/users/fffw/gists{/gist_id}","starred_url":"https://api.github.com/users/fffw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fffw/subscriptions","organizations_url":"https://api.github.com/users/fffw/orgs","repos_url":"https://api.github.com/users/fffw/repos","events_url":"https://api.github.com/users/fffw/events{/privacy}","received_events_url":"https://api.github.com/users/fffw/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/getlantern/go-update/pulls/4/commits","review_comments_url":"https://api.github.com/repos/getlantern/go-update/pulls/4/comments","review_comment_url":"https://api.github.com/repos/getlantern/go-update/pulls/comments{/number}","comments_url":"https://api.github.com/repos/getlantern/go-update/issues/4/comments","statuses_url":"https://api.github.com/repos/getlantern/go-update/statuses/53f79887535d8aa085037b3a36f53fa1ebf3d0ae","head":{"label":"getlantern:feature/message-validation","ref":"feature/message-validation","sha":"53f79887535d8aa085037b3a36f53fa1ebf3d0ae","user":{"login":"getlantern","id":624178,"avatar_url":"https://avatars.githubusercontent.com/u/624178?v=3","gravatar_id":"","url":"https://api.github.com/users/getlantern","html_url":"https://github.com/getlantern","followers_url":"https://api.github.com/users/getlantern/followers","following_url":"https://api.github.com/users/getlantern/following{/other_user}","gists_url":"https://api.github.com/users/getlantern/gists{/gist_id}","starred_url":"https://api.github.com/users/getlantern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getlantern/subscriptions","organizations_url":"https://api.github.com/users/getlantern/orgs","repos_url":"https://api.github.com/users/getlantern/repos","events_url":"https://api.github.com/users/getlantern/events{/privacy}","received_events_url":"https://api.github.com/users/getlantern/received_events","type":"Organization","site_admin":false},"repo":{"id":30544226,"name":"go-update","full_name":"getlantern/go-update","owner":{"login":"getlantern","id":624178,"avatar_url":"https://avatars.githubusercontent.com/u/624178?v=3","gravatar_id":"","url":"https://api.github.com/users/getlantern","html_url":"https://github.com/getlantern","followers_url":"https://api.github.com/users/getlantern/followers","following_url":"https://api.github.com/users/getlantern/following{/other_user}","gists_url":"https://api.github.com/users/getlantern/gists{/gist_id}","starred_url":"https://api.github.com/users/getlantern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getlantern/subscriptions","organizations_url":"https://api.github.com/users/getlantern/orgs","repos_url":"https://api.github.com/users/getlantern/repos","events_url":"https://api.github.com/users/getlantern/events{/privacy}","received_events_url":"https://api.github.com/users/getlantern/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/getlantern/go-update","description":"Update Go programs from the internet","fork":true,"url":"https://api.github.com/repos/getlantern/go-update","forks_url":"https://api.github.com/repos/getlantern/go-update/forks","keys_url":"https://api.github.com/repos/getlantern/go-update/keys{/key_id}","collaborators_url":"https://api.github.com/repos/getlantern/go-update/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/getlantern/go-update/teams","hooks_url":"https://api.github.com/repos/getlantern/go-update/hooks","issue_events_url":"https://api.github.com/repos/getlantern/go-update/issues/events{/number}","events_url":"https://api.github.com/repos/getlantern/go-update/events","assignees_url":"https://api.github.com/repos/getlantern/go-update/assignees{/user}","branches_url":"https://api.github.com/repos/getlantern/go-update/branches{/branch}","tags_url":"https://api.github.com/repos/getlantern/go-update/tags","blobs_url":"https://api.github.com/repos/getlantern/go-update/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/getlantern/go-update/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/getlantern/go-update/git/refs{/sha}","trees_url":"https://api.github.com/repos/getlantern/go-update/git/trees{/sha}","statuses_url":"https://api.github.com/repos/getlantern/go-update/statuses/{sha}","languages_url":"https://api.github.com/repos/getlantern/go-update/languages","stargazers_url":"https://api.github.com/repos/getlantern/go-update/stargazers","contributors_url":"https://api.github.com/repos/getlantern/go-update/contributors","subscribers_url":"https://api.github.com/repos/getlantern/go-update/subscribers","subscription_url":"https://api.github.com/repos/getlantern/go-update/subscription","commits_url":"https://api.github.com/repos/getlantern/go-update/commits{/sha}","git_commits_url":"https://api.github.com/repos/getlantern/go-update/git/commits{/sha}","comments_url":"https://api.github.com/repos/getlantern/go-update/comments{/number}","issue_comment_url":"https://api.github.com/repos/getlantern/go-update/issues/comments{/number}","contents_url":"https://api.github.com/repos/getlantern/go-update/contents/{+path}","compare_url":"https://api.github.com/repos/getlantern/go-update/compare/{base}...{head}","merges_url":"https://api.github.com/repos/getlantern/go-update/merges","archive_url":"https://api.github.com/repos/getlantern/go-update/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/getlantern/go-update/downloads","issues_url":"https://api.github.com/repos/getlantern/go-update/issues{/number}","pulls_url":"https://api.github.com/repos/getlantern/go-update/pulls{/number}","milestones_url":"https://api.github.com/repos/getlantern/go-update/milestones{/number}","notifications_url":"https://api.github.com/repos/getlantern/go-update/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/getlantern/go-update/labels{/name}","releases_url":"https://api.github.com/repos/getlantern/go-update/releases{/id}","deployments_url":"https://api.github.com/repos/getlantern/go-update/deployments","created_at":"2015-02-09T16:03:42Z","updated_at":"2016-08-04T16:43:40Z","pushed_at":"2016-08-19T19:23:21Z","git_url":"git://github.com/getlantern/go-update.git","ssh_url":"git@github.com:getlantern/go-update.git","clone_url":"https://github.com/getlantern/go-update.git","svn_url":"https://github.com/getlantern/go-update","homepage":"","size":95,"stargazers_count":3,"watchers_count":3,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":3,"default_branch":"master"}},"base":{"label":"getlantern:master","ref":"master","sha":"18a9062139c5d850b9792bec3fc78032db39cd62","user":{"login":"getlantern","id":624178,"avatar_url":"https://avatars.githubusercontent.com/u/624178?v=3","gravatar_id":"","url":"https://api.github.com/users/getlantern","html_url":"https://github.com/getlantern","followers_url":"https://api.github.com/users/getlantern/followers","following_url":"https://api.github.com/users/getlantern/following{/other_user}","gists_url":"https://api.github.com/users/getlantern/gists{/gist_id}","starred_url":"https://api.github.com/users/getlantern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getlantern/subscriptions","organizations_url":"https://api.github.com/users/getlantern/orgs","repos_url":"https://api.github.com/users/getlantern/repos","events_url":"https://api.github.com/users/getlantern/events{/privacy}","received_events_url":"https://api.github.com/users/getlantern/received_events","type":"Organization","site_admin":false},"repo":{"id":30544226,"name":"go-update","full_name":"getlantern/go-update","owner":{"login":"getlantern","id":624178,"avatar_url":"https://avatars.githubusercontent.com/u/624178?v=3","gravatar_id":"","url":"https://api.github.com/users/getlantern","html_url":"https://github.com/getlantern","followers_url":"https://api.github.com/users/getlantern/followers","following_url":"https://api.github.com/users/getlantern/following{/other_user}","gists_url":"https://api.github.com/users/getlantern/gists{/gist_id}","starred_url":"https://api.github.com/users/getlantern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getlantern/subscriptions","organizations_url":"https://api.github.com/users/getlantern/orgs","repos_url":"https://api.github.com/users/getlantern/repos","events_url":"https://api.github.com/users/getlantern/events{/privacy}","received_events_url":"https://api.github.com/users/getlantern/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/getlantern/go-update","description":"Update Go programs from the internet","fork":true,"url":"https://api.github.com/repos/getlantern/go-update","forks_url":"https://api.github.com/repos/getlantern/go-update/forks","keys_url":"https://api.github.com/repos/getlantern/go-update/keys{/key_id}","collaborators_url":"https://api.github.com/repos/getlantern/go-update/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/getlantern/go-update/teams","hooks_url":"https://api.github.com/repos/getlantern/go-update/hooks","issue_events_url":"https://api.github.com/repos/getlantern/go-update/issues/events{/number}","events_url":"https://api.github.com/repos/getlantern/go-update/events","assignees_url":"https://api.github.com/repos/getlantern/go-update/assignees{/user}","branches_url":"https://api.github.com/repos/getlantern/go-update/branches{/branch}","tags_url":"https://api.github.com/repos/getlantern/go-update/tags","blobs_url":"https://api.github.com/repos/getlantern/go-update/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/getlantern/go-update/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/getlantern/go-update/git/refs{/sha}","trees_url":"https://api.github.com/repos/getlantern/go-update/git/trees{/sha}","statuses_url":"https://api.github.com/repos/getlantern/go-update/statuses/{sha}","languages_url":"https://api.github.com/repos/getlantern/go-update/languages","stargazers_url":"https://api.github.com/repos/getlantern/go-update/stargazers","contributors_url":"https://api.github.com/repos/getlantern/go-update/contributors","subscribers_url":"https://api.github.com/repos/getlantern/go-update/subscribers","subscription_url":"https://api.github.com/repos/getlantern/go-update/subscription","commits_url":"https://api.github.com/repos/getlantern/go-update/commits{/sha}","git_commits_url":"https://api.github.com/repos/getlantern/go-update/git/commits{/sha}","comments_url":"https://api.github.com/repos/getlantern/go-update/comments{/number}","issue_comment_url":"https://api.github.com/repos/getlantern/go-update/issues/comments{/number}","contents_url":"https://api.github.com/repos/getlantern/go-update/contents/{+path}","compare_url":"https://api.github.com/repos/getlantern/go-update/compare/{base}...{head}","merges_url":"https://api.github.com/repos/getlantern/go-update/merges","archive_url":"https://api.github.com/repos/getlantern/go-update/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/getlantern/go-update/downloads","issues_url":"https://api.github.com/repos/getlantern/go-update/issues{/number}","pulls_url":"https://api.github.com/repos/getlantern/go-update/pulls{/number}","milestones_url":"https://api.github.com/repos/getlantern/go-update/milestones{/number}","notifications_url":"https://api.github.com/repos/getlantern/go-update/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/getlantern/go-update/labels{/name}","releases_url":"https://api.github.com/repos/getlantern/go-update/releases{/id}","deployments_url":"https://api.github.com/repos/getlantern/go-update/deployments","created_at":"2015-02-09T16:03:42Z","updated_at":"2016-08-04T16:43:40Z","pushed_at":"2016-08-19T19:23:21Z","git_url":"git://github.com/getlantern/go-update.git","ssh_url":"git@github.com:getlantern/go-update.git","clone_url":"https://github.com/getlantern/go-update.git","svn_url":"https://github.com/getlantern/go-update","homepage":"","size":95,"stargazers_count":3,"watchers_count":3,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/getlantern/go-update/pulls/4"},"html":{"href":"https://github.com/getlantern/go-update/pull/4"},"issue":{"href":"https://api.github.com/repos/getlantern/go-update/issues/4"},"comments":{"href":"https://api.github.com/repos/getlantern/go-update/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/getlantern/go-update/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/getlantern/go-update/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/getlantern/go-update/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/getlantern/go-update/statuses/53f79887535d8aa085037b3a36f53fa1ebf3d0ae"}}}}
{"actor":{"display_login":"fffw"}}