GitHub PullRequestReviewCommentEvent at 2014-06-13 07:28:51
Repository: rails
Actor: larrylv
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/rails/rails/pulls/comments/13740641","id":13740641,"diff_hunk":"@@ -449,7 +449,7 @@ def token_and_options(request)\n         authorization_request = request.authorization.to_s\n         if authorization_request[TOKEN_REGEX]\n           params = token_params_from authorization_request\n-          [params.shift.last, Hash[params].with_indifferent_access]\n+          [(params.shift)[1], Hash[params].with_indifferent_access]","path":"actionpack/lib/action_controller/metal/http_authentication.rb","position":5,"original_position":5,"commit_id":"5f86e02406d2a82e834c6ee724c1185348ad3ade","original_commit_id":"5f86e02406d2a82e834c6ee724c1185348ad3ade","user":{"login":"larrylv","id":531650,"avatar_url":"https://avatars.githubusercontent.com/u/531650?","gravatar_id":"56aebe7431dc8cfec47697da54426a21","url":"https://api.github.com/users/larrylv","html_url":"https://github.com/larrylv","followers_url":"https://api.github.com/users/larrylv/followers","following_url":"https://api.github.com/users/larrylv/following{/other_user}","gists_url":"https://api.github.com/users/larrylv/gists{/gist_id}","starred_url":"https://api.github.com/users/larrylv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larrylv/subscriptions","organizations_url":"https://api.github.com/users/larrylv/orgs","repos_url":"https://api.github.com/users/larrylv/repos","events_url":"https://api.github.com/users/larrylv/events{/privacy}","received_events_url":"https://api.github.com/users/larrylv/received_events","type":"User","site_admin":false},"body":"It is needless. I put it just for making code clear.","created_at":"2014-06-13T07:28:51Z","updated_at":"2014-06-13T07:28:51Z","html_url":"https://github.com/rails/rails/pull/15683#discussion_r13740641","pull_request_url":"https://api.github.com/repos/rails/rails/pulls/15683","_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/comments/13740641"},"html":{"href":"https://github.com/rails/rails/pull/15683#discussion_r13740641"},"pull_request":{"href":"https://api.github.com/repos/rails/rails/pulls/15683"}}},"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/15683","id":17094679,"html_url":"https://github.com/rails/rails/pull/15683","diff_url":"https://github.com/rails/rails/pull/15683.diff","patch_url":"https://github.com/rails/rails/pull/15683.patch","issue_url":"https://api.github.com/repos/rails/rails/issues/15683","number":15683,"state":"open","title":"Fix parsed token value with header `Authorization token=`.","user":{"login":"larrylv","id":531650,"avatar_url":"https://avatars.githubusercontent.com/u/531650?","gravatar_id":"56aebe7431dc8cfec47697da54426a21","url":"https://api.github.com/users/larrylv","html_url":"https://github.com/larrylv","followers_url":"https://api.github.com/users/larrylv/followers","following_url":"https://api.github.com/users/larrylv/following{/other_user}","gists_url":"https://api.github.com/users/larrylv/gists{/gist_id}","starred_url":"https://api.github.com/users/larrylv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larrylv/subscriptions","organizations_url":"https://api.github.com/users/larrylv/orgs","repos_url":"https://api.github.com/users/larrylv/repos","events_url":"https://api.github.com/users/larrylv/events{/privacy}","received_events_url":"https://api.github.com/users/larrylv/received_events","type":"User","site_admin":false},"body":"Related issue: #14846\r\n\r\nWith header `Authorization: Token token=`, we get token value as `nil` instead of `token`.\r\n\r\nThe current implementation with `params.shift.last` or `param.last` assume `params` or `param` is a two-elements array. But with malformed request, they are not, so instead of `last`, we should use `[1]`\r\n\r\ncc @simonbnrd @robin850","created_at":"2014-06-13T06:24:59Z","updated_at":"2014-06-13T07:28:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"63020e64179a138e82611a8d360348852128b7c2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rails/rails/pulls/15683/commits","review_comments_url":"https://api.github.com/repos/rails/rails/pulls/15683/comments","review_comment_url":"https://api.github.com/repos/rails/rails/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rails/rails/issues/15683/comments","statuses_url":"https://api.github.com/repos/rails/rails/statuses/5f86e02406d2a82e834c6ee724c1185348ad3ade","head":{"label":"larrylv:fix-token-with-empty-value","ref":"fix-token-with-empty-value","sha":"5f86e02406d2a82e834c6ee724c1185348ad3ade","user":{"login":"larrylv","id":531650,"avatar_url":"https://avatars.githubusercontent.com/u/531650?","gravatar_id":"56aebe7431dc8cfec47697da54426a21","url":"https://api.github.com/users/larrylv","html_url":"https://github.com/larrylv","followers_url":"https://api.github.com/users/larrylv/followers","following_url":"https://api.github.com/users/larrylv/following{/other_user}","gists_url":"https://api.github.com/users/larrylv/gists{/gist_id}","starred_url":"https://api.github.com/users/larrylv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larrylv/subscriptions","organizations_url":"https://api.github.com/users/larrylv/orgs","repos_url":"https://api.github.com/users/larrylv/repos","events_url":"https://api.github.com/users/larrylv/events{/privacy}","received_events_url":"https://api.github.com/users/larrylv/received_events","type":"User","site_admin":false},"repo":{"id":5813736,"name":"rails","full_name":"larrylv/rails","owner":{"login":"larrylv","id":531650,"avatar_url":"https://avatars.githubusercontent.com/u/531650?","gravatar_id":"56aebe7431dc8cfec47697da54426a21","url":"https://api.github.com/users/larrylv","html_url":"https://github.com/larrylv","followers_url":"https://api.github.com/users/larrylv/followers","following_url":"https://api.github.com/users/larrylv/following{/other_user}","gists_url":"https://api.github.com/users/larrylv/gists{/gist_id}","starred_url":"https://api.github.com/users/larrylv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larrylv/subscriptions","organizations_url":"https://api.github.com/users/larrylv/orgs","repos_url":"https://api.github.com/users/larrylv/repos","events_url":"https://api.github.com/users/larrylv/events{/privacy}","received_events_url":"https://api.github.com/users/larrylv/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/larrylv/rails","description":"Ruby on Rails","fork":true,"url":"https://api.github.com/repos/larrylv/rails","forks_url":"https://api.github.com/repos/larrylv/rails/forks","keys_url":"https://api.github.com/repos/larrylv/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/larrylv/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/larrylv/rails/teams","hooks_url":"https://api.github.com/repos/larrylv/rails/hooks","issue_events_url":"https://api.github.com/repos/larrylv/rails/issues/events{/number}","events_url":"https://api.github.com/repos/larrylv/rails/events","assignees_url":"https://api.github.com/repos/larrylv/rails/assignees{/user}","branches_url":"https://api.github.com/repos/larrylv/rails/branches{/branch}","tags_url":"https://api.github.com/repos/larrylv/rails/tags","blobs_url":"https://api.github.com/repos/larrylv/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/larrylv/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/larrylv/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/larrylv/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/larrylv/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/larrylv/rails/languages","stargazers_url":"https://api.github.com/repos/larrylv/rails/stargazers","contributors_url":"https://api.github.com/repos/larrylv/rails/contributors","subscribers_url":"https://api.github.com/repos/larrylv/rails/subscribers","subscription_url":"https://api.github.com/repos/larrylv/rails/subscription","commits_url":"https://api.github.com/repos/larrylv/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/larrylv/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/larrylv/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/larrylv/rails/issues/comments/{number}","contents_url":"https://api.github.com/repos/larrylv/rails/contents/{+path}","compare_url":"https://api.github.com/repos/larrylv/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/larrylv/rails/merges","archive_url":"https://api.github.com/repos/larrylv/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/larrylv/rails/downloads","issues_url":"https://api.github.com/repos/larrylv/rails/issues{/number}","pulls_url":"https://api.github.com/repos/larrylv/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/larrylv/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/larrylv/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/larrylv/rails/labels{/name}","releases_url":"https://api.github.com/repos/larrylv/rails/releases{/id}","created_at":"2012-09-14T19:27:19Z","updated_at":"2014-06-13T06:25:00Z","pushed_at":"2014-06-13T06:20:39Z","git_url":"git://github.com/larrylv/rails.git","ssh_url":"git@github.com:larrylv/rails.git","clone_url":"https://github.com/larrylv/rails.git","svn_url":"https://github.com/larrylv/rails","homepage":"http://rubyonrails.org","size":109097,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rails:master","ref":"master","sha":"d6bb7892665d93ee55828c0b5df6c5f5e635c15f","user":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?","gravatar_id":"30f39a09e233e8369dddf6feb4be0308","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"repo":{"id":8514,"name":"rails","full_name":"rails/rails","owner":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?","gravatar_id":"30f39a09e233e8369dddf6feb4be0308","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rails/rails","description":"Ruby on Rails","fork":false,"url":"https://api.github.com/repos/rails/rails","forks_url":"https://api.github.com/repos/rails/rails/forks","keys_url":"https://api.github.com/repos/rails/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rails/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rails/rails/teams","hooks_url":"https://api.github.com/repos/rails/rails/hooks","issue_events_url":"https://api.github.com/repos/rails/rails/issues/events{/number}","events_url":"https://api.github.com/repos/rails/rails/events","assignees_url":"https://api.github.com/repos/rails/rails/assignees{/user}","branches_url":"https://api.github.com/repos/rails/rails/branches{/branch}","tags_url":"https://api.github.com/repos/rails/rails/tags","blobs_url":"https://api.github.com/repos/rails/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rails/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rails/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/rails/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rails/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/rails/rails/languages","stargazers_url":"https://api.github.com/repos/rails/rails/stargazers","contributors_url":"https://api.github.com/repos/rails/rails/contributors","subscribers_url":"https://api.github.com/repos/rails/rails/subscribers","subscription_url":"https://api.github.com/repos/rails/rails/subscription","commits_url":"https://api.github.com/repos/rails/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/rails/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/rails/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/rails/rails/issues/comments/{number}","contents_url":"https://api.github.com/repos/rails/rails/contents/{+path}","compare_url":"https://api.github.com/repos/rails/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rails/rails/merges","archive_url":"https://api.github.com/repos/rails/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rails/rails/downloads","issues_url":"https://api.github.com/repos/rails/rails/issues{/number}","pulls_url":"https://api.github.com/repos/rails/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/rails/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/rails/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rails/rails/labels{/name}","releases_url":"https://api.github.com/repos/rails/rails/releases{/id}","created_at":"2008-04-11T02:19:47Z","updated_at":"2014-06-13T07:28:31Z","pushed_at":"2014-06-13T07:28:30Z","git_url":"git://github.com/rails/rails.git","ssh_url":"git@github.com:rails/rails.git","clone_url":"https://github.com/rails/rails.git","svn_url":"https://github.com/rails/rails","homepage":"http://rubyonrails.org","size":318964,"stargazers_count":22137,"watchers_count":22137,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"forks_count":8211,"mirror_url":null,"open_issues_count":619,"forks":8211,"open_issues":619,"watchers":22137,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/15683"},"html":{"href":"https://github.com/rails/rails/pull/15683"},"issue":{"href":"https://api.github.com/repos/rails/rails/issues/15683"},"comments":{"href":"https://api.github.com/repos/rails/rails/issues/15683/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/rails/pulls/15683/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/rails/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rails/rails/pulls/15683/commits"},"statuses":{"href":"https://api.github.com/repos/rails/rails/statuses/5f86e02406d2a82e834c6ee724c1185348ad3ade"}}}}