GitHub PullRequestReviewCommentEvent at 2014-12-09 03:59:44
Repository: doorkeeper
Actor: houndci
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/pulls/comments/21506026","id":21506026,"diff_hunk":"@@ -51,4 +51,27 @@\n       i_should_see_translated_error_message :unsupported_response_type\n     end\n   end\n+\n+  context 'forgery protection enabled' do\n+    before do\n+      ActionController::Base.allow_forgery_protection = true\n+    end\n+\n+    after do\n+      ActionController::Base.allow_forgery_protection = false\n+    end\n+\n+    background do\n+      create_resource_owner\n+      sign_in\n+      # Ensure compatiblity between Rails 3 and Rails 4 in handling CSRF failures","path":"spec/requests/endpoints/authorization_spec.rb","position":17,"original_position":17,"commit_id":"c1ca424fb1eaf3aea97dab4fe59447b89a2c6bdf","original_commit_id":"c1ca424fb1eaf3aea97dab4fe59447b89a2c6bdf","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Line is too long. [81/80]","created_at":"2014-12-09T03:59:44Z","updated_at":"2014-12-09T03:59:44Z","html_url":"https://github.com/doorkeeper-gem/doorkeeper/pull/516#discussion_r21506026","pull_request_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/pulls/516","_links":{"self":{"href":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/pulls/comments/21506026"},"html":{"href":"https://github.com/doorkeeper-gem/doorkeeper/pull/516#discussion_r21506026"},"pull_request":{"href":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/pulls/516"}}},"pull_request":{"url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/pulls/516","id":25717924,"html_url":"https://github.com/doorkeeper-gem/doorkeeper/pull/516","diff_url":"https://github.com/doorkeeper-gem/doorkeeper/pull/516.diff","patch_url":"https://github.com/doorkeeper-gem/doorkeeper/pull/516.patch","issue_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/issues/516","number":516,"state":"open","locked":false,"title":"Add 'protect_from_forgery` to turn on Rail's built-in protection.","user":{"login":"phillbaker","id":94505,"avatar_url":"https://avatars.githubusercontent.com/u/94505?v=3","gravatar_id":"","url":"https://api.github.com/users/phillbaker","html_url":"https://github.com/phillbaker","followers_url":"https://api.github.com/users/phillbaker/followers","following_url":"https://api.github.com/users/phillbaker/following{/other_user}","gists_url":"https://api.github.com/users/phillbaker/gists{/gist_id}","starred_url":"https://api.github.com/users/phillbaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phillbaker/subscriptions","organizations_url":"https://api.github.com/users/phillbaker/orgs","repos_url":"https://api.github.com/users/phillbaker/repos","events_url":"https://api.github.com/users/phillbaker/events{/privacy}","received_events_url":"https://api.github.com/users/phillbaker/received_events","type":"User","site_admin":false},"body":"Since the Doorkeeper controllers inherit from Doorkeeper::Application (which inherits directly from ActionController::Base) and not ApplicationController, they never call `protect_from_forgery`, which means that non-GET methods don’t validate CSRF tokens. Thus, it’s possible for an attacker to host a form on an arbitrary URL, and if a users is logged into a site that uses Doorkeeper visits the URL, the attacker can grant access to a application on that site.","created_at":"2014-12-09T03:59:37Z","updated_at":"2014-12-09T03:59:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6044ed1584efd95625d87522cb5c84e39f0b815d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/pulls/516/commits","review_comments_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/pulls/516/comments","review_comment_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/pulls/comments/{number}","comments_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/issues/516/comments","statuses_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/statuses/c1ca424fb1eaf3aea97dab4fe59447b89a2c6bdf","head":{"label":"phillbaker:bugfix/csrf","ref":"bugfix/csrf","sha":"c1ca424fb1eaf3aea97dab4fe59447b89a2c6bdf","user":{"login":"phillbaker","id":94505,"avatar_url":"https://avatars.githubusercontent.com/u/94505?v=3","gravatar_id":"","url":"https://api.github.com/users/phillbaker","html_url":"https://github.com/phillbaker","followers_url":"https://api.github.com/users/phillbaker/followers","following_url":"https://api.github.com/users/phillbaker/following{/other_user}","gists_url":"https://api.github.com/users/phillbaker/gists{/gist_id}","starred_url":"https://api.github.com/users/phillbaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phillbaker/subscriptions","organizations_url":"https://api.github.com/users/phillbaker/orgs","repos_url":"https://api.github.com/users/phillbaker/repos","events_url":"https://api.github.com/users/phillbaker/events{/privacy}","received_events_url":"https://api.github.com/users/phillbaker/received_events","type":"User","site_admin":false},"repo":{"id":27720547,"name":"doorkeeper","full_name":"phillbaker/doorkeeper","owner":{"login":"phillbaker","id":94505,"avatar_url":"https://avatars.githubusercontent.com/u/94505?v=3","gravatar_id":"","url":"https://api.github.com/users/phillbaker","html_url":"https://github.com/phillbaker","followers_url":"https://api.github.com/users/phillbaker/followers","following_url":"https://api.github.com/users/phillbaker/following{/other_user}","gists_url":"https://api.github.com/users/phillbaker/gists{/gist_id}","starred_url":"https://api.github.com/users/phillbaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phillbaker/subscriptions","organizations_url":"https://api.github.com/users/phillbaker/orgs","repos_url":"https://api.github.com/users/phillbaker/repos","events_url":"https://api.github.com/users/phillbaker/events{/privacy}","received_events_url":"https://api.github.com/users/phillbaker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/phillbaker/doorkeeper","description":"Doorkeeper is an OAuth 2 provider for Rails.","fork":true,"url":"https://api.github.com/repos/phillbaker/doorkeeper","forks_url":"https://api.github.com/repos/phillbaker/doorkeeper/forks","keys_url":"https://api.github.com/repos/phillbaker/doorkeeper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phillbaker/doorkeeper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phillbaker/doorkeeper/teams","hooks_url":"https://api.github.com/repos/phillbaker/doorkeeper/hooks","issue_events_url":"https://api.github.com/repos/phillbaker/doorkeeper/issues/events{/number}","events_url":"https://api.github.com/repos/phillbaker/doorkeeper/events","assignees_url":"https://api.github.com/repos/phillbaker/doorkeeper/assignees{/user}","branches_url":"https://api.github.com/repos/phillbaker/doorkeeper/branches{/branch}","tags_url":"https://api.github.com/repos/phillbaker/doorkeeper/tags","blobs_url":"https://api.github.com/repos/phillbaker/doorkeeper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phillbaker/doorkeeper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phillbaker/doorkeeper/git/refs{/sha}","trees_url":"https://api.github.com/repos/phillbaker/doorkeeper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phillbaker/doorkeeper/statuses/{sha}","languages_url":"https://api.github.com/repos/phillbaker/doorkeeper/languages","stargazers_url":"https://api.github.com/repos/phillbaker/doorkeeper/stargazers","contributors_url":"https://api.github.com/repos/phillbaker/doorkeeper/contributors","subscribers_url":"https://api.github.com/repos/phillbaker/doorkeeper/subscribers","subscription_url":"https://api.github.com/repos/phillbaker/doorkeeper/subscription","commits_url":"https://api.github.com/repos/phillbaker/doorkeeper/commits{/sha}","git_commits_url":"https://api.github.com/repos/phillbaker/doorkeeper/git/commits{/sha}","comments_url":"https://api.github.com/repos/phillbaker/doorkeeper/comments{/number}","issue_comment_url":"https://api.github.com/repos/phillbaker/doorkeeper/issues/comments/{number}","contents_url":"https://api.github.com/repos/phillbaker/doorkeeper/contents/{+path}","compare_url":"https://api.github.com/repos/phillbaker/doorkeeper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phillbaker/doorkeeper/merges","archive_url":"https://api.github.com/repos/phillbaker/doorkeeper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phillbaker/doorkeeper/downloads","issues_url":"https://api.github.com/repos/phillbaker/doorkeeper/issues{/number}","pulls_url":"https://api.github.com/repos/phillbaker/doorkeeper/pulls{/number}","milestones_url":"https://api.github.com/repos/phillbaker/doorkeeper/milestones{/number}","notifications_url":"https://api.github.com/repos/phillbaker/doorkeeper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phillbaker/doorkeeper/labels{/name}","releases_url":"https://api.github.com/repos/phillbaker/doorkeeper/releases{/id}","created_at":"2014-12-08T15:13:56Z","updated_at":"2014-12-09T03:43:47Z","pushed_at":"2014-12-09T03:43:47Z","git_url":"git://github.com/phillbaker/doorkeeper.git","ssh_url":"git@github.com:phillbaker/doorkeeper.git","clone_url":"https://github.com/phillbaker/doorkeeper.git","svn_url":"https://github.com/phillbaker/doorkeeper","homepage":"https://github.com/doorkeeper-gem/doorkeeper","size":6561,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":0,"default_branch":"bugfix/csrf"}},"base":{"label":"doorkeeper-gem:master","ref":"master","sha":"2f74804e57efbf469bf28a0fad922ca7f1a85cd6","user":{"login":"doorkeeper-gem","id":7275750,"avatar_url":"https://avatars.githubusercontent.com/u/7275750?v=3","gravatar_id":"","url":"https://api.github.com/users/doorkeeper-gem","html_url":"https://github.com/doorkeeper-gem","followers_url":"https://api.github.com/users/doorkeeper-gem/followers","following_url":"https://api.github.com/users/doorkeeper-gem/following{/other_user}","gists_url":"https://api.github.com/users/doorkeeper-gem/gists{/gist_id}","starred_url":"https://api.github.com/users/doorkeeper-gem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doorkeeper-gem/subscriptions","organizations_url":"https://api.github.com/users/doorkeeper-gem/orgs","repos_url":"https://api.github.com/users/doorkeeper-gem/repos","events_url":"https://api.github.com/users/doorkeeper-gem/events{/privacy}","received_events_url":"https://api.github.com/users/doorkeeper-gem/received_events","type":"Organization","site_admin":false},"repo":{"id":2802565,"name":"doorkeeper","full_name":"doorkeeper-gem/doorkeeper","owner":{"login":"doorkeeper-gem","id":7275750,"avatar_url":"https://avatars.githubusercontent.com/u/7275750?v=3","gravatar_id":"","url":"https://api.github.com/users/doorkeeper-gem","html_url":"https://github.com/doorkeeper-gem","followers_url":"https://api.github.com/users/doorkeeper-gem/followers","following_url":"https://api.github.com/users/doorkeeper-gem/following{/other_user}","gists_url":"https://api.github.com/users/doorkeeper-gem/gists{/gist_id}","starred_url":"https://api.github.com/users/doorkeeper-gem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doorkeeper-gem/subscriptions","organizations_url":"https://api.github.com/users/doorkeeper-gem/orgs","repos_url":"https://api.github.com/users/doorkeeper-gem/repos","events_url":"https://api.github.com/users/doorkeeper-gem/events{/privacy}","received_events_url":"https://api.github.com/users/doorkeeper-gem/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/doorkeeper-gem/doorkeeper","description":"Doorkeeper is an OAuth 2 provider for Rails.","fork":false,"url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper","forks_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/forks","keys_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/teams","hooks_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/hooks","issue_events_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/issues/events{/number}","events_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/events","assignees_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/assignees{/user}","branches_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/branches{/branch}","tags_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/tags","blobs_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/git/refs{/sha}","trees_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/statuses/{sha}","languages_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/languages","stargazers_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/stargazers","contributors_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/contributors","subscribers_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/subscribers","subscription_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/subscription","commits_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/commits{/sha}","git_commits_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/git/commits{/sha}","comments_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/comments{/number}","issue_comment_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/issues/comments/{number}","contents_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/contents/{+path}","compare_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/merges","archive_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/downloads","issues_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/issues{/number}","pulls_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/pulls{/number}","milestones_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/milestones{/number}","notifications_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/labels{/name}","releases_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/releases{/id}","created_at":"2011-11-18T13:02:01Z","updated_at":"2014-12-09T03:41:26Z","pushed_at":"2014-12-09T03:41:37Z","git_url":"git://github.com/doorkeeper-gem/doorkeeper.git","ssh_url":"git@github.com:doorkeeper-gem/doorkeeper.git","clone_url":"https://github.com/doorkeeper-gem/doorkeeper.git","svn_url":"https://github.com/doorkeeper-gem/doorkeeper","homepage":"https://github.com/doorkeeper-gem/doorkeeper","size":6561,"stargazers_count":1865,"watchers_count":1865,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":392,"mirror_url":null,"open_issues_count":8,"forks":392,"open_issues":8,"watchers":1865,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/pulls/516"},"html":{"href":"https://github.com/doorkeeper-gem/doorkeeper/pull/516"},"issue":{"href":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/issues/516"},"comments":{"href":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/issues/516/comments"},"review_comments":{"href":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/pulls/516/comments"},"review_comment":{"href":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/pulls/516/commits"},"statuses":{"href":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/statuses/c1ca424fb1eaf3aea97dab4fe59447b89a2c6bdf"}}}}