{"action":"created","comment":{"url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/pulls/comments/23832846","id":23832846,"diff_hunk":"@@ -41,6 +43,10 @@ module.exports = (function() {\n     if (!task || !_.isString(task) || !task.trim()) {\n       throw new ValidationError('create pulsar job requires a pulsar task');\n     }\n+    task = task.replace(/[\\s\\\\\\/]+/g, '');\n+    if (Pulsar.ILLEGAL_TASKS.indexOf(task) >= 0) {\n+      throw new ValidationError('create pulsar job requires a pulsar task');","path":"lib/pulsar/index.js","position":15,"original_position":15,"commit_id":"42204c64f355cc826bbdfbd50679e821b563173d","original_commit_id":"42204c64f355cc826bbdfbd50679e821b563173d","user":{"login":"vogdb","id":372386,"avatar_url":"https://avatars.githubusercontent.com/u/372386?v=3","gravatar_id":"","url":"https://api.github.com/users/vogdb","html_url":"https://github.com/vogdb","followers_url":"https://api.github.com/users/vogdb/followers","following_url":"https://api.github.com/users/vogdb/following{/other_user}","gists_url":"https://api.github.com/users/vogdb/gists{/gist_id}","starred_url":"https://api.github.com/users/vogdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vogdb/subscriptions","organizations_url":"https://api.github.com/users/vogdb/orgs","repos_url":"https://api.github.com/users/vogdb/repos","events_url":"https://api.github.com/users/vogdb/events{/privacy}","received_events_url":"https://api.github.com/users/vogdb/received_events","type":"User","site_admin":false},"body":"> Maybe rather throw that it's illegal task?\r\n\r\nI didn't want to give any insights about our security. If you confirm that it is ok to write a message like \"Illegal task\" then I'll use it. Do you confirm?\r\n\r\n> What about doing it other way around? Getting available tasks, removing blacklisted (illegal) ones and then checking if provided task is on that list?\r\n\r\nNice idea! I think it's worth to implement. Will do it.","created_at":"2015-01-30T10:00:28Z","updated_at":"2015-01-30T10:00:28Z","html_url":"https://github.com/cargomedia/pulsar-rest-api/pull/53#discussion_r23832846","pull_request_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/pulls/53","_links":{"self":{"href":"https://api.github.com/repos/cargomedia/pulsar-rest-api/pulls/comments/23832846"},"html":{"href":"https://github.com/cargomedia/pulsar-rest-api/pull/53#discussion_r23832846"},"pull_request":{"href":"https://api.github.com/repos/cargomedia/pulsar-rest-api/pulls/53"}}},"pull_request":{"url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/pulls/53","id":28218706,"html_url":"https://github.com/cargomedia/pulsar-rest-api/pull/53","diff_url":"https://github.com/cargomedia/pulsar-rest-api/pull/53.diff","patch_url":"https://github.com/cargomedia/pulsar-rest-api/pull/53.patch","issue_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/issues/53","number":53,"state":"open","locked":false,"title":"Disallow pulsar tasks: invoke, shell.","user":{"login":"vogdb","id":372386,"avatar_url":"https://avatars.githubusercontent.com/u/372386?v=3","gravatar_id":"","url":"https://api.github.com/users/vogdb","html_url":"https://github.com/vogdb","followers_url":"https://api.github.com/users/vogdb/followers","following_url":"https://api.github.com/users/vogdb/following{/other_user}","gists_url":"https://api.github.com/users/vogdb/gists{/gist_id}","starred_url":"https://api.github.com/users/vogdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vogdb/subscriptions","organizations_url":"https://api.github.com/users/vogdb/orgs","repos_url":"https://api.github.com/users/vogdb/repos","events_url":"https://api.github.com/users/vogdb/events{/privacy}","received_events_url":"https://api.github.com/users/vogdb/received_events","type":"User","site_admin":false},"body":"Connects to #52.","created_at":"2015-01-28T18:49:55Z","updated_at":"2015-01-30T10:00:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cd0265bc92363cd6637ebeccb0d6c88e5b6a0c3a","assignee":{"login":"vogdb","id":372386,"avatar_url":"https://avatars.githubusercontent.com/u/372386?v=3","gravatar_id":"","url":"https://api.github.com/users/vogdb","html_url":"https://github.com/vogdb","followers_url":"https://api.github.com/users/vogdb/followers","following_url":"https://api.github.com/users/vogdb/following{/other_user}","gists_url":"https://api.github.com/users/vogdb/gists{/gist_id}","starred_url":"https://api.github.com/users/vogdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vogdb/subscriptions","organizations_url":"https://api.github.com/users/vogdb/orgs","repos_url":"https://api.github.com/users/vogdb/repos","events_url":"https://api.github.com/users/vogdb/events{/privacy}","received_events_url":"https://api.github.com/users/vogdb/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/pulls/53/commits","review_comments_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/pulls/53/comments","review_comment_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/pulls/comments/{number}","comments_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/issues/53/comments","statuses_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/statuses/42204c64f355cc826bbdfbd50679e821b563173d","head":{"label":"vogdb:issue-53","ref":"issue-53","sha":"42204c64f355cc826bbdfbd50679e821b563173d","user":{"login":"vogdb","id":372386,"avatar_url":"https://avatars.githubusercontent.com/u/372386?v=3","gravatar_id":"","url":"https://api.github.com/users/vogdb","html_url":"https://github.com/vogdb","followers_url":"https://api.github.com/users/vogdb/followers","following_url":"https://api.github.com/users/vogdb/following{/other_user}","gists_url":"https://api.github.com/users/vogdb/gists{/gist_id}","starred_url":"https://api.github.com/users/vogdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vogdb/subscriptions","organizations_url":"https://api.github.com/users/vogdb/orgs","repos_url":"https://api.github.com/users/vogdb/repos","events_url":"https://api.github.com/users/vogdb/events{/privacy}","received_events_url":"https://api.github.com/users/vogdb/received_events","type":"User","site_admin":false},"repo":{"id":17981861,"name":"pulsar-rest-api","full_name":"vogdb/pulsar-rest-api","owner":{"login":"vogdb","id":372386,"avatar_url":"https://avatars.githubusercontent.com/u/372386?v=3","gravatar_id":"","url":"https://api.github.com/users/vogdb","html_url":"https://github.com/vogdb","followers_url":"https://api.github.com/users/vogdb/followers","following_url":"https://api.github.com/users/vogdb/following{/other_user}","gists_url":"https://api.github.com/users/vogdb/gists{/gist_id}","starred_url":"https://api.github.com/users/vogdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vogdb/subscriptions","organizations_url":"https://api.github.com/users/vogdb/orgs","repos_url":"https://api.github.com/users/vogdb/repos","events_url":"https://api.github.com/users/vogdb/events{/privacy}","received_events_url":"https://api.github.com/users/vogdb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vogdb/pulsar-rest-api","description":"HTTP REST API for executing Pulsar tasks","fork":true,"url":"https://api.github.com/repos/vogdb/pulsar-rest-api","forks_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/forks","keys_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/teams","hooks_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/hooks","issue_events_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/issues/events{/number}","events_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/events","assignees_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/assignees{/user}","branches_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/branches{/branch}","tags_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/tags","blobs_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/statuses/{sha}","languages_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/languages","stargazers_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/stargazers","contributors_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/contributors","subscribers_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/subscribers","subscription_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/subscription","commits_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/issues/comments/{number}","contents_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/contents/{+path}","compare_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/merges","archive_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/downloads","issues_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/issues{/number}","pulls_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/pulls{/number}","milestones_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/milestones{/number}","notifications_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/labels{/name}","releases_url":"https://api.github.com/repos/vogdb/pulsar-rest-api/releases{/id}","created_at":"2014-03-21T14:17:54Z","updated_at":"2014-12-05T16:45:40Z","pushed_at":"2015-01-28T19:13:29Z","git_url":"git://github.com/vogdb/pulsar-rest-api.git","ssh_url":"git@github.com:vogdb/pulsar-rest-api.git","clone_url":"https://github.com/vogdb/pulsar-rest-api.git","svn_url":"https://github.com/vogdb/pulsar-rest-api","homepage":"","size":1048,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cargomedia:master","ref":"master","sha":"ee72c2a39a1c92f048d97f595f056fb395c9c477","user":{"login":"cargomedia","id":1699929,"avatar_url":"https://avatars.githubusercontent.com/u/1699929?v=3","gravatar_id":"","url":"https://api.github.com/users/cargomedia","html_url":"https://github.com/cargomedia","followers_url":"https://api.github.com/users/cargomedia/followers","following_url":"https://api.github.com/users/cargomedia/following{/other_user}","gists_url":"https://api.github.com/users/cargomedia/gists{/gist_id}","starred_url":"https://api.github.com/users/cargomedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cargomedia/subscriptions","organizations_url":"https://api.github.com/users/cargomedia/orgs","repos_url":"https://api.github.com/users/cargomedia/repos","events_url":"https://api.github.com/users/cargomedia/events{/privacy}","received_events_url":"https://api.github.com/users/cargomedia/received_events","type":"Organization","site_admin":false},"repo":{"id":15672601,"name":"pulsar-rest-api","full_name":"cargomedia/pulsar-rest-api","owner":{"login":"cargomedia","id":1699929,"avatar_url":"https://avatars.githubusercontent.com/u/1699929?v=3","gravatar_id":"","url":"https://api.github.com/users/cargomedia","html_url":"https://github.com/cargomedia","followers_url":"https://api.github.com/users/cargomedia/followers","following_url":"https://api.github.com/users/cargomedia/following{/other_user}","gists_url":"https://api.github.com/users/cargomedia/gists{/gist_id}","starred_url":"https://api.github.com/users/cargomedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cargomedia/subscriptions","organizations_url":"https://api.github.com/users/cargomedia/orgs","repos_url":"https://api.github.com/users/cargomedia/repos","events_url":"https://api.github.com/users/cargomedia/events{/privacy}","received_events_url":"https://api.github.com/users/cargomedia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cargomedia/pulsar-rest-api","description":"HTTP REST API for executing Pulsar tasks","fork":false,"url":"https://api.github.com/repos/cargomedia/pulsar-rest-api","forks_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/forks","keys_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/teams","hooks_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/hooks","issue_events_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/issues/events{/number}","events_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/events","assignees_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/assignees{/user}","branches_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/branches{/branch}","tags_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/tags","blobs_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/statuses/{sha}","languages_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/languages","stargazers_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/stargazers","contributors_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/contributors","subscribers_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/subscribers","subscription_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/subscription","commits_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/issues/comments/{number}","contents_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/contents/{+path}","compare_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/merges","archive_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/downloads","issues_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/issues{/number}","pulls_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/pulls{/number}","milestones_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/milestones{/number}","notifications_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/labels{/name}","releases_url":"https://api.github.com/repos/cargomedia/pulsar-rest-api/releases{/id}","created_at":"2014-01-06T11:43:57Z","updated_at":"2014-12-05T16:47:04Z","pushed_at":"2014-12-05T16:47:13Z","git_url":"git://github.com/cargomedia/pulsar-rest-api.git","ssh_url":"git@github.com:cargomedia/pulsar-rest-api.git","clone_url":"https://github.com/cargomedia/pulsar-rest-api.git","svn_url":"https://github.com/cargomedia/pulsar-rest-api","homepage":"","size":818,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":6,"forks":6,"open_issues":6,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cargomedia/pulsar-rest-api/pulls/53"},"html":{"href":"https://github.com/cargomedia/pulsar-rest-api/pull/53"},"issue":{"href":"https://api.github.com/repos/cargomedia/pulsar-rest-api/issues/53"},"comments":{"href":"https://api.github.com/repos/cargomedia/pulsar-rest-api/issues/53/comments"},"review_comments":{"href":"https://api.github.com/repos/cargomedia/pulsar-rest-api/pulls/53/comments"},"review_comment":{"href":"https://api.github.com/repos/cargomedia/pulsar-rest-api/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/cargomedia/pulsar-rest-api/pulls/53/commits"},"statuses":{"href":"https://api.github.com/repos/cargomedia/pulsar-rest-api/statuses/42204c64f355cc826bbdfbd50679e821b563173d"}}}}