{"action":"created","comment":{"url":"https://api.github.com/repos/balderdashy/sails/pulls/comments/39942893","id":39942893,"diff_hunk":"@@ -77,8 +77,14 @@ module.exports = function(sails) {\n           var allowCrossOriginCSRF = sails.config.csrf.origin.split(',').map(trim).indexOf(req.headers.origin) > -1;\n \n           if (sails.config.csrf.protectionEnabled) {\n-            var connect = require('express/node_modules/connect');\n-\n+            var connect;\n+            try {\n+              // Support npm v3 flat dependency installations.\n+              connect = require('connect');","path":"lib/hooks/csrf/index.js","position":9,"original_position":9,"commit_id":"a31acfb64ededcc7a8d7e21832d60b4773a4d4a4","original_commit_id":"a31acfb64ededcc7a8d7e21832d60b4773a4d4a4","user":{"login":"tjwebb","id":1009114,"avatar_url":"https://avatars.githubusercontent.com/u/1009114?v=3","gravatar_id":"","url":"https://api.github.com/users/tjwebb","html_url":"https://github.com/tjwebb","followers_url":"https://api.github.com/users/tjwebb/followers","following_url":"https://api.github.com/users/tjwebb/following{/other_user}","gists_url":"https://api.github.com/users/tjwebb/gists{/gist_id}","starred_url":"https://api.github.com/users/tjwebb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjwebb/subscriptions","organizations_url":"https://api.github.com/users/tjwebb/orgs","repos_url":"https://api.github.com/users/tjwebb/repos","events_url":"https://api.github.com/users/tjwebb/events{/privacy}","received_events_url":"https://api.github.com/users/tjwebb/received_events","type":"User","site_admin":false},"body":"Alright I'll check that out, thanks.","created_at":"2015-09-21T06:01:14Z","updated_at":"2015-09-21T06:01:14Z","html_url":"https://github.com/balderdashy/sails/pull/3245#discussion_r39942893","pull_request_url":"https://api.github.com/repos/balderdashy/sails/pulls/3245","_links":{"self":{"href":"https://api.github.com/repos/balderdashy/sails/pulls/comments/39942893"},"html":{"href":"https://github.com/balderdashy/sails/pull/3245#discussion_r39942893"},"pull_request":{"href":"https://api.github.com/repos/balderdashy/sails/pulls/3245"}}},"pull_request":{"url":"https://api.github.com/repos/balderdashy/sails/pulls/3245","id":45469217,"html_url":"https://github.com/balderdashy/sails/pull/3245","diff_url":"https://github.com/balderdashy/sails/pull/3245.diff","patch_url":"https://github.com/balderdashy/sails/pull/3245.patch","issue_url":"https://api.github.com/repos/balderdashy/sails/issues/3245","number":3245,"state":"open","locked":false,"title":"Remove nested require in csrf to accomodate npmv3","user":{"login":"calling","id":1501771,"avatar_url":"https://avatars.githubusercontent.com/u/1501771?v=3","gravatar_id":"","url":"https://api.github.com/users/calling","html_url":"https://github.com/calling","followers_url":"https://api.github.com/users/calling/followers","following_url":"https://api.github.com/users/calling/following{/other_user}","gists_url":"https://api.github.com/users/calling/gists{/gist_id}","starred_url":"https://api.github.com/users/calling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calling/subscriptions","organizations_url":"https://api.github.com/users/calling/orgs","repos_url":"https://api.github.com/users/calling/repos","events_url":"https://api.github.com/users/calling/events{/privacy}","received_events_url":"https://api.github.com/users/calling/received_events","type":"User","site_admin":false},"body":"Fixes https://github.com/balderdashy/sails/issues/3176","created_at":"2015-09-19T03:48:45Z","updated_at":"2015-09-21T06:01:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"62900b17da0e4fedd0c5f98de7ac86b5e60ea283","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/balderdashy/sails/pulls/3245/commits","review_comments_url":"https://api.github.com/repos/balderdashy/sails/pulls/3245/comments","review_comment_url":"https://api.github.com/repos/balderdashy/sails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/balderdashy/sails/issues/3245/comments","statuses_url":"https://api.github.com/repos/balderdashy/sails/statuses/a31acfb64ededcc7a8d7e21832d60b4773a4d4a4","head":{"label":"calling:issue_3176","ref":"issue_3176","sha":"a31acfb64ededcc7a8d7e21832d60b4773a4d4a4","user":{"login":"calling","id":1501771,"avatar_url":"https://avatars.githubusercontent.com/u/1501771?v=3","gravatar_id":"","url":"https://api.github.com/users/calling","html_url":"https://github.com/calling","followers_url":"https://api.github.com/users/calling/followers","following_url":"https://api.github.com/users/calling/following{/other_user}","gists_url":"https://api.github.com/users/calling/gists{/gist_id}","starred_url":"https://api.github.com/users/calling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calling/subscriptions","organizations_url":"https://api.github.com/users/calling/orgs","repos_url":"https://api.github.com/users/calling/repos","events_url":"https://api.github.com/users/calling/events{/privacy}","received_events_url":"https://api.github.com/users/calling/received_events","type":"User","site_admin":false},"repo":{"id":42757944,"name":"sails","full_name":"calling/sails","owner":{"login":"calling","id":1501771,"avatar_url":"https://avatars.githubusercontent.com/u/1501771?v=3","gravatar_id":"","url":"https://api.github.com/users/calling","html_url":"https://github.com/calling","followers_url":"https://api.github.com/users/calling/followers","following_url":"https://api.github.com/users/calling/following{/other_user}","gists_url":"https://api.github.com/users/calling/gists{/gist_id}","starred_url":"https://api.github.com/users/calling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calling/subscriptions","organizations_url":"https://api.github.com/users/calling/orgs","repos_url":"https://api.github.com/users/calling/repos","events_url":"https://api.github.com/users/calling/events{/privacy}","received_events_url":"https://api.github.com/users/calling/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/calling/sails","description":"Realtime MVC Framework for Node.js","fork":true,"url":"https://api.github.com/repos/calling/sails","forks_url":"https://api.github.com/repos/calling/sails/forks","keys_url":"https://api.github.com/repos/calling/sails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/calling/sails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/calling/sails/teams","hooks_url":"https://api.github.com/repos/calling/sails/hooks","issue_events_url":"https://api.github.com/repos/calling/sails/issues/events{/number}","events_url":"https://api.github.com/repos/calling/sails/events","assignees_url":"https://api.github.com/repos/calling/sails/assignees{/user}","branches_url":"https://api.github.com/repos/calling/sails/branches{/branch}","tags_url":"https://api.github.com/repos/calling/sails/tags","blobs_url":"https://api.github.com/repos/calling/sails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/calling/sails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/calling/sails/git/refs{/sha}","trees_url":"https://api.github.com/repos/calling/sails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/calling/sails/statuses/{sha}","languages_url":"https://api.github.com/repos/calling/sails/languages","stargazers_url":"https://api.github.com/repos/calling/sails/stargazers","contributors_url":"https://api.github.com/repos/calling/sails/contributors","subscribers_url":"https://api.github.com/repos/calling/sails/subscribers","subscription_url":"https://api.github.com/repos/calling/sails/subscription","commits_url":"https://api.github.com/repos/calling/sails/commits{/sha}","git_commits_url":"https://api.github.com/repos/calling/sails/git/commits{/sha}","comments_url":"https://api.github.com/repos/calling/sails/comments{/number}","issue_comment_url":"https://api.github.com/repos/calling/sails/issues/comments{/number}","contents_url":"https://api.github.com/repos/calling/sails/contents/{+path}","compare_url":"https://api.github.com/repos/calling/sails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/calling/sails/merges","archive_url":"https://api.github.com/repos/calling/sails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/calling/sails/downloads","issues_url":"https://api.github.com/repos/calling/sails/issues{/number}","pulls_url":"https://api.github.com/repos/calling/sails/pulls{/number}","milestones_url":"https://api.github.com/repos/calling/sails/milestones{/number}","notifications_url":"https://api.github.com/repos/calling/sails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/calling/sails/labels{/name}","releases_url":"https://api.github.com/repos/calling/sails/releases{/id}","created_at":"2015-09-19T03:27:09Z","updated_at":"2015-09-19T03:27:14Z","pushed_at":"2015-09-19T04:08:21Z","git_url":"git://github.com/calling/sails.git","ssh_url":"git@github.com:calling/sails.git","clone_url":"https://github.com/calling/sails.git","svn_url":"https://github.com/calling/sails","homepage":"http://sailsjs.org","size":23498,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"balderdashy:master","ref":"master","sha":"2abb2841cc48c8b4b86065ec0620cab904c2c39e","user":{"login":"balderdashy","id":1445252,"avatar_url":"https://avatars.githubusercontent.com/u/1445252?v=3","gravatar_id":"","url":"https://api.github.com/users/balderdashy","html_url":"https://github.com/balderdashy","followers_url":"https://api.github.com/users/balderdashy/followers","following_url":"https://api.github.com/users/balderdashy/following{/other_user}","gists_url":"https://api.github.com/users/balderdashy/gists{/gist_id}","starred_url":"https://api.github.com/users/balderdashy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balderdashy/subscriptions","organizations_url":"https://api.github.com/users/balderdashy/orgs","repos_url":"https://api.github.com/users/balderdashy/repos","events_url":"https://api.github.com/users/balderdashy/events{/privacy}","received_events_url":"https://api.github.com/users/balderdashy/received_events","type":"Organization","site_admin":false},"repo":{"id":3757512,"name":"sails","full_name":"balderdashy/sails","owner":{"login":"balderdashy","id":1445252,"avatar_url":"https://avatars.githubusercontent.com/u/1445252?v=3","gravatar_id":"","url":"https://api.github.com/users/balderdashy","html_url":"https://github.com/balderdashy","followers_url":"https://api.github.com/users/balderdashy/followers","following_url":"https://api.github.com/users/balderdashy/following{/other_user}","gists_url":"https://api.github.com/users/balderdashy/gists{/gist_id}","starred_url":"https://api.github.com/users/balderdashy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balderdashy/subscriptions","organizations_url":"https://api.github.com/users/balderdashy/orgs","repos_url":"https://api.github.com/users/balderdashy/repos","events_url":"https://api.github.com/users/balderdashy/events{/privacy}","received_events_url":"https://api.github.com/users/balderdashy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/balderdashy/sails","description":"Realtime MVC Framework for Node.js","fork":false,"url":"https://api.github.com/repos/balderdashy/sails","forks_url":"https://api.github.com/repos/balderdashy/sails/forks","keys_url":"https://api.github.com/repos/balderdashy/sails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/balderdashy/sails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/balderdashy/sails/teams","hooks_url":"https://api.github.com/repos/balderdashy/sails/hooks","issue_events_url":"https://api.github.com/repos/balderdashy/sails/issues/events{/number}","events_url":"https://api.github.com/repos/balderdashy/sails/events","assignees_url":"https://api.github.com/repos/balderdashy/sails/assignees{/user}","branches_url":"https://api.github.com/repos/balderdashy/sails/branches{/branch}","tags_url":"https://api.github.com/repos/balderdashy/sails/tags","blobs_url":"https://api.github.com/repos/balderdashy/sails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/balderdashy/sails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/balderdashy/sails/git/refs{/sha}","trees_url":"https://api.github.com/repos/balderdashy/sails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/balderdashy/sails/statuses/{sha}","languages_url":"https://api.github.com/repos/balderdashy/sails/languages","stargazers_url":"https://api.github.com/repos/balderdashy/sails/stargazers","contributors_url":"https://api.github.com/repos/balderdashy/sails/contributors","subscribers_url":"https://api.github.com/repos/balderdashy/sails/subscribers","subscription_url":"https://api.github.com/repos/balderdashy/sails/subscription","commits_url":"https://api.github.com/repos/balderdashy/sails/commits{/sha}","git_commits_url":"https://api.github.com/repos/balderdashy/sails/git/commits{/sha}","comments_url":"https://api.github.com/repos/balderdashy/sails/comments{/number}","issue_comment_url":"https://api.github.com/repos/balderdashy/sails/issues/comments{/number}","contents_url":"https://api.github.com/repos/balderdashy/sails/contents/{+path}","compare_url":"https://api.github.com/repos/balderdashy/sails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/balderdashy/sails/merges","archive_url":"https://api.github.com/repos/balderdashy/sails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/balderdashy/sails/downloads","issues_url":"https://api.github.com/repos/balderdashy/sails/issues{/number}","pulls_url":"https://api.github.com/repos/balderdashy/sails/pulls{/number}","milestones_url":"https://api.github.com/repos/balderdashy/sails/milestones{/number}","notifications_url":"https://api.github.com/repos/balderdashy/sails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/balderdashy/sails/labels{/name}","releases_url":"https://api.github.com/repos/balderdashy/sails/releases{/id}","created_at":"2012-03-18T19:46:15Z","updated_at":"2015-09-21T04:27:21Z","pushed_at":"2015-09-20T01:56:15Z","git_url":"git://github.com/balderdashy/sails.git","ssh_url":"git@github.com:balderdashy/sails.git","clone_url":"https://github.com/balderdashy/sails.git","svn_url":"https://github.com/balderdashy/sails","homepage":"http://sailsjs.org","size":23498,"stargazers_count":11927,"watchers_count":11927,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1272,"mirror_url":null,"open_issues_count":306,"forks":1272,"open_issues":306,"watchers":11927,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/balderdashy/sails/pulls/3245"},"html":{"href":"https://github.com/balderdashy/sails/pull/3245"},"issue":{"href":"https://api.github.com/repos/balderdashy/sails/issues/3245"},"comments":{"href":"https://api.github.com/repos/balderdashy/sails/issues/3245/comments"},"review_comments":{"href":"https://api.github.com/repos/balderdashy/sails/pulls/3245/comments"},"review_comment":{"href":"https://api.github.com/repos/balderdashy/sails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/balderdashy/sails/pulls/3245/commits"},"statuses":{"href":"https://api.github.com/repos/balderdashy/sails/statuses/a31acfb64ededcc7a8d7e21832d60b4773a4d4a4"}}}}