{"action":"created","comment":{"url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/pulls/comments/48770215","id":48770215,"diff_hunk":"@@ -10,19 +10,26 @@ app.get('/', function(req, res) {\n   res.status(200).send('Hello; socket.io!\\n');\n });\n \n-function doEmit(e) {\n-  var rooms = e['rooms'];\n-  if (!(rooms && typeof rooms.forEach === 'function' && rooms.length > 0)) {\n-    return;\n-  }\n-  var sender = io.sockets;\n-  rooms.forEach(function(room) { sender = sender.to(room); });\n-  sender.emit('message', e['msg']);\n+// Safe replacement for .bind() that also catches any errors.\n+// This is used to ensure that malformed client messages do not trigger an\n+// uncaught exception.\n+function safe(f, context) {\n+  return function() {\n+    try {\n+      return f.apply(context, arguments);\n+    } catch (e) {\n+      console.log('Safe error:', e);","path":"app.js","position":20,"original_position":20,"commit_id":"823343cd61ad29ec4ddd37e5ddea6826876f1f47","original_commit_id":"823343cd61ad29ec4ddd37e5ddea6826876f1f47","user":{"login":"dborkan","id":6494307,"avatar_url":"https://avatars.githubusercontent.com/u/6494307?v=3","gravatar_id":"","url":"https://api.github.com/users/dborkan","html_url":"https://github.com/dborkan","followers_url":"https://api.github.com/users/dborkan/followers","following_url":"https://api.github.com/users/dborkan/following{/other_user}","gists_url":"https://api.github.com/users/dborkan/gists{/gist_id}","starred_url":"https://api.github.com/users/dborkan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dborkan/subscriptions","organizations_url":"https://api.github.com/users/dborkan/orgs","repos_url":"https://api.github.com/users/dborkan/repos","events_url":"https://api.github.com/users/dborkan/events{/privacy}","received_events_url":"https://api.github.com/users/dborkan/received_events","type":"User","site_admin":false},"body":"Maybe change this to console.error","created_at":"2016-01-04T19:32:58Z","updated_at":"2016-01-04T19:32:58Z","html_url":"https://github.com/uProxy/freedom-social-quiver-server/pull/3#discussion_r48770215","pull_request_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/pulls/comments/48770215"},"html":{"href":"https://github.com/uProxy/freedom-social-quiver-server/pull/3#discussion_r48770215"},"pull_request":{"href":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/pulls/3","id":54688514,"html_url":"https://github.com/uProxy/freedom-social-quiver-server/pull/3","diff_url":"https://github.com/uProxy/freedom-social-quiver-server/pull/3.diff","patch_url":"https://github.com/uProxy/freedom-social-quiver-server/pull/3.patch","issue_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/issues/3","number":3,"state":"open","locked":false,"title":"Remove multiroom broadcast and improve malformed input safety","user":{"login":"bemasc","id":191945,"avatar_url":"https://avatars.githubusercontent.com/u/191945?v=3","gravatar_id":"","url":"https://api.github.com/users/bemasc","html_url":"https://github.com/bemasc","followers_url":"https://api.github.com/users/bemasc/followers","following_url":"https://api.github.com/users/bemasc/following{/other_user}","gists_url":"https://api.github.com/users/bemasc/gists{/gist_id}","starred_url":"https://api.github.com/users/bemasc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bemasc/subscriptions","organizations_url":"https://api.github.com/users/bemasc/orgs","repos_url":"https://api.github.com/users/bemasc/repos","events_url":"https://api.github.com/users/bemasc/events{/privacy}","received_events_url":"https://api.github.com/users/bemasc/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-28T22:25:27Z","updated_at":"2016-01-04T19:32:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"def3743f2b5a96a0825836cac21d1db30e591718","assignee":{"login":"dborkan","id":6494307,"avatar_url":"https://avatars.githubusercontent.com/u/6494307?v=3","gravatar_id":"","url":"https://api.github.com/users/dborkan","html_url":"https://github.com/dborkan","followers_url":"https://api.github.com/users/dborkan/followers","following_url":"https://api.github.com/users/dborkan/following{/other_user}","gists_url":"https://api.github.com/users/dborkan/gists{/gist_id}","starred_url":"https://api.github.com/users/dborkan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dborkan/subscriptions","organizations_url":"https://api.github.com/users/dborkan/orgs","repos_url":"https://api.github.com/users/dborkan/repos","events_url":"https://api.github.com/users/dborkan/events{/privacy}","received_events_url":"https://api.github.com/users/dborkan/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/pulls/3/commits","review_comments_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/pulls/3/comments","review_comment_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/issues/3/comments","statuses_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/statuses/823343cd61ad29ec4ddd37e5ddea6826876f1f47","head":{"label":"uProxy:bemasc-room","ref":"bemasc-room","sha":"823343cd61ad29ec4ddd37e5ddea6826876f1f47","user":{"login":"uProxy","id":6548286,"avatar_url":"https://avatars.githubusercontent.com/u/6548286?v=3","gravatar_id":"","url":"https://api.github.com/users/uProxy","html_url":"https://github.com/uProxy","followers_url":"https://api.github.com/users/uProxy/followers","following_url":"https://api.github.com/users/uProxy/following{/other_user}","gists_url":"https://api.github.com/users/uProxy/gists{/gist_id}","starred_url":"https://api.github.com/users/uProxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uProxy/subscriptions","organizations_url":"https://api.github.com/users/uProxy/orgs","repos_url":"https://api.github.com/users/uProxy/repos","events_url":"https://api.github.com/users/uProxy/events{/privacy}","received_events_url":"https://api.github.com/users/uProxy/received_events","type":"Organization","site_admin":false},"repo":{"id":46434807,"name":"freedom-social-quiver-server","full_name":"uProxy/freedom-social-quiver-server","owner":{"login":"uProxy","id":6548286,"avatar_url":"https://avatars.githubusercontent.com/u/6548286?v=3","gravatar_id":"","url":"https://api.github.com/users/uProxy","html_url":"https://github.com/uProxy","followers_url":"https://api.github.com/users/uProxy/followers","following_url":"https://api.github.com/users/uProxy/following{/other_user}","gists_url":"https://api.github.com/users/uProxy/gists{/gist_id}","starred_url":"https://api.github.com/users/uProxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uProxy/subscriptions","organizations_url":"https://api.github.com/users/uProxy/orgs","repos_url":"https://api.github.com/users/uProxy/repos","events_url":"https://api.github.com/users/uProxy/events{/privacy}","received_events_url":"https://api.github.com/users/uProxy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uProxy/freedom-social-quiver-server","description":"Ultra-minimal pubsub server","fork":false,"url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server","forks_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/forks","keys_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/teams","hooks_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/hooks","issue_events_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/issues/events{/number}","events_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/events","assignees_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/assignees{/user}","branches_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/branches{/branch}","tags_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/tags","blobs_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/statuses/{sha}","languages_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/languages","stargazers_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/stargazers","contributors_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/contributors","subscribers_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/subscribers","subscription_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/subscription","commits_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/contents/{+path}","compare_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/merges","archive_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/downloads","issues_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/issues{/number}","pulls_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/pulls{/number}","milestones_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/milestones{/number}","notifications_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/labels{/name}","releases_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/releases{/id}","created_at":"2015-11-18T17:16:48Z","updated_at":"2015-11-18T17:18:39Z","pushed_at":"2015-12-28T22:25:27Z","git_url":"git://github.com/uProxy/freedom-social-quiver-server.git","ssh_url":"git@github.com:uProxy/freedom-social-quiver-server.git","clone_url":"https://github.com/uProxy/freedom-social-quiver-server.git","svn_url":"https://github.com/uProxy/freedom-social-quiver-server","homepage":null,"size":7,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"uProxy:master","ref":"master","sha":"f97cdcddf6ce83962665502f96e4918882109945","user":{"login":"uProxy","id":6548286,"avatar_url":"https://avatars.githubusercontent.com/u/6548286?v=3","gravatar_id":"","url":"https://api.github.com/users/uProxy","html_url":"https://github.com/uProxy","followers_url":"https://api.github.com/users/uProxy/followers","following_url":"https://api.github.com/users/uProxy/following{/other_user}","gists_url":"https://api.github.com/users/uProxy/gists{/gist_id}","starred_url":"https://api.github.com/users/uProxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uProxy/subscriptions","organizations_url":"https://api.github.com/users/uProxy/orgs","repos_url":"https://api.github.com/users/uProxy/repos","events_url":"https://api.github.com/users/uProxy/events{/privacy}","received_events_url":"https://api.github.com/users/uProxy/received_events","type":"Organization","site_admin":false},"repo":{"id":46434807,"name":"freedom-social-quiver-server","full_name":"uProxy/freedom-social-quiver-server","owner":{"login":"uProxy","id":6548286,"avatar_url":"https://avatars.githubusercontent.com/u/6548286?v=3","gravatar_id":"","url":"https://api.github.com/users/uProxy","html_url":"https://github.com/uProxy","followers_url":"https://api.github.com/users/uProxy/followers","following_url":"https://api.github.com/users/uProxy/following{/other_user}","gists_url":"https://api.github.com/users/uProxy/gists{/gist_id}","starred_url":"https://api.github.com/users/uProxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uProxy/subscriptions","organizations_url":"https://api.github.com/users/uProxy/orgs","repos_url":"https://api.github.com/users/uProxy/repos","events_url":"https://api.github.com/users/uProxy/events{/privacy}","received_events_url":"https://api.github.com/users/uProxy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uProxy/freedom-social-quiver-server","description":"Ultra-minimal pubsub server","fork":false,"url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server","forks_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/forks","keys_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/teams","hooks_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/hooks","issue_events_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/issues/events{/number}","events_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/events","assignees_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/assignees{/user}","branches_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/branches{/branch}","tags_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/tags","blobs_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/statuses/{sha}","languages_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/languages","stargazers_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/stargazers","contributors_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/contributors","subscribers_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/subscribers","subscription_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/subscription","commits_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/contents/{+path}","compare_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/merges","archive_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/downloads","issues_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/issues{/number}","pulls_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/pulls{/number}","milestones_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/milestones{/number}","notifications_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/labels{/name}","releases_url":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/releases{/id}","created_at":"2015-11-18T17:16:48Z","updated_at":"2015-11-18T17:18:39Z","pushed_at":"2015-12-28T22:25:27Z","git_url":"git://github.com/uProxy/freedom-social-quiver-server.git","ssh_url":"git@github.com:uProxy/freedom-social-quiver-server.git","clone_url":"https://github.com/uProxy/freedom-social-quiver-server.git","svn_url":"https://github.com/uProxy/freedom-social-quiver-server","homepage":null,"size":7,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/pulls/3"},"html":{"href":"https://github.com/uProxy/freedom-social-quiver-server/pull/3"},"issue":{"href":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/issues/3"},"comments":{"href":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/uProxy/freedom-social-quiver-server/statuses/823343cd61ad29ec4ddd37e5ddea6826876f1f47"}}}}