{"action":"created","comment":{"url":"https://api.github.com/repos/lookout/borderpatrol/pulls/comments/73736818","id":73736818,"diff_hunk":"@@ -114,6 +114,21 @@ object BorderAuth {\n         else r.uri.replaceFirst(serviceId.path.toString, rwPath.toString)\n       }\n     }\n+\n+  /**\n+    * Centralize attempt to fetch a 'destination' param. In future this could be parametrized.\n+    * Try to get a scrubbed value that then needs to be checked against known host names.\n+    *\n+    * @param paramMap\n+    * @param destinationValidator\n+    * @return Option if a valid hostname (value) was extracted from paramMap\n+    */\n+  def attemptDestinationFetch(paramMap: ParamMap)(implicit destinationValidator: DestinationValidator): Option[String] =","path":"core/src/main/scala/com/lookout/borderpatrol/auth/BorderAuth.scala","position":13,"original_position":13,"commit_id":"2ac391598261cd3021c50dbedc881be1595c8386","original_commit_id":"2ac391598261cd3021c50dbedc881be1595c8386","user":{"login":"maheshkelkar","id":10839177,"avatar_url":"https://avatars.githubusercontent.com/u/10839177?v=3","gravatar_id":"","url":"https://api.github.com/users/maheshkelkar","html_url":"https://github.com/maheshkelkar","followers_url":"https://api.github.com/users/maheshkelkar/followers","following_url":"https://api.github.com/users/maheshkelkar/following{/other_user}","gists_url":"https://api.github.com/users/maheshkelkar/gists{/gist_id}","starred_url":"https://api.github.com/users/maheshkelkar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maheshkelkar/subscriptions","organizations_url":"https://api.github.com/users/maheshkelkar/orgs","repos_url":"https://api.github.com/users/maheshkelkar/repos","events_url":"https://api.github.com/users/maheshkelkar/events{/privacy}","received_events_url":"https://api.github.com/users/maheshkelkar/received_events","type":"User","site_admin":false},"body":"I am not sure why do we need this method here? How about incorporating this scrubQueryParams in the DestinationValidator itself?\r\n\r\nAlso, if you insist on this, we should rename this method to something simple.","created_at":"2016-08-05T18:16:19Z","updated_at":"2016-08-05T18:16:19Z","html_url":"https://github.com/lookout/borderpatrol/pull/189#discussion_r73736818","pull_request_url":"https://api.github.com/repos/lookout/borderpatrol/pulls/189","_links":{"self":{"href":"https://api.github.com/repos/lookout/borderpatrol/pulls/comments/73736818"},"html":{"href":"https://github.com/lookout/borderpatrol/pull/189#discussion_r73736818"},"pull_request":{"href":"https://api.github.com/repos/lookout/borderpatrol/pulls/189"}}},"pull_request":{"url":"https://api.github.com/repos/lookout/borderpatrol/pulls/189","id":80255444,"html_url":"https://github.com/lookout/borderpatrol/pull/189","diff_url":"https://github.com/lookout/borderpatrol/pull/189.diff","patch_url":"https://github.com/lookout/borderpatrol/pull/189.patch","issue_url":"https://api.github.com/repos/lookout/borderpatrol/issues/189","number":189,"state":"open","locked":false,"title":"If destination query param is URL, then validate that host belongs to Set of valid hosts","user":{"login":"rikesh-chouhan","id":15759837,"avatar_url":"https://avatars.githubusercontent.com/u/15759837?v=3","gravatar_id":"","url":"https://api.github.com/users/rikesh-chouhan","html_url":"https://github.com/rikesh-chouhan","followers_url":"https://api.github.com/users/rikesh-chouhan/followers","following_url":"https://api.github.com/users/rikesh-chouhan/following{/other_user}","gists_url":"https://api.github.com/users/rikesh-chouhan/gists{/gist_id}","starred_url":"https://api.github.com/users/rikesh-chouhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rikesh-chouhan/subscriptions","organizations_url":"https://api.github.com/users/rikesh-chouhan/orgs","repos_url":"https://api.github.com/users/rikesh-chouhan/repos","events_url":"https://api.github.com/users/rikesh-chouhan/events{/privacy}","received_events_url":"https://api.github.com/users/rikesh-chouhan/received_events","type":"User","site_admin":false},"body":"Push changes to check if host name for a \"destination\" is allowed.\r\nCaller can proceed on action with value obtained from DestinationValidator\r\n\r\nFixes #188 ","created_at":"2016-08-05T14:48:24Z","updated_at":"2016-08-05T18:16:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"946142b11c644dd6e73208fe644440f169ec5a3c","assignee":{"login":"maheshkelkar","id":10839177,"avatar_url":"https://avatars.githubusercontent.com/u/10839177?v=3","gravatar_id":"","url":"https://api.github.com/users/maheshkelkar","html_url":"https://github.com/maheshkelkar","followers_url":"https://api.github.com/users/maheshkelkar/followers","following_url":"https://api.github.com/users/maheshkelkar/following{/other_user}","gists_url":"https://api.github.com/users/maheshkelkar/gists{/gist_id}","starred_url":"https://api.github.com/users/maheshkelkar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maheshkelkar/subscriptions","organizations_url":"https://api.github.com/users/maheshkelkar/orgs","repos_url":"https://api.github.com/users/maheshkelkar/repos","events_url":"https://api.github.com/users/maheshkelkar/events{/privacy}","received_events_url":"https://api.github.com/users/maheshkelkar/received_events","type":"User","site_admin":false},"assignees":[{"login":"maheshkelkar","id":10839177,"avatar_url":"https://avatars.githubusercontent.com/u/10839177?v=3","gravatar_id":"","url":"https://api.github.com/users/maheshkelkar","html_url":"https://github.com/maheshkelkar","followers_url":"https://api.github.com/users/maheshkelkar/followers","following_url":"https://api.github.com/users/maheshkelkar/following{/other_user}","gists_url":"https://api.github.com/users/maheshkelkar/gists{/gist_id}","starred_url":"https://api.github.com/users/maheshkelkar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maheshkelkar/subscriptions","organizations_url":"https://api.github.com/users/maheshkelkar/orgs","repos_url":"https://api.github.com/users/maheshkelkar/repos","events_url":"https://api.github.com/users/maheshkelkar/events{/privacy}","received_events_url":"https://api.github.com/users/maheshkelkar/received_events","type":"User","site_admin":false},{"login":"PeterFCaswell","id":11891688,"avatar_url":"https://avatars.githubusercontent.com/u/11891688?v=3","gravatar_id":"","url":"https://api.github.com/users/PeterFCaswell","html_url":"https://github.com/PeterFCaswell","followers_url":"https://api.github.com/users/PeterFCaswell/followers","following_url":"https://api.github.com/users/PeterFCaswell/following{/other_user}","gists_url":"https://api.github.com/users/PeterFCaswell/gists{/gist_id}","starred_url":"https://api.github.com/users/PeterFCaswell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PeterFCaswell/subscriptions","organizations_url":"https://api.github.com/users/PeterFCaswell/orgs","repos_url":"https://api.github.com/users/PeterFCaswell/repos","events_url":"https://api.github.com/users/PeterFCaswell/events{/privacy}","received_events_url":"https://api.github.com/users/PeterFCaswell/received_events","type":"User","site_admin":false},{"login":"kgangwani","id":14285971,"avatar_url":"https://avatars.githubusercontent.com/u/14285971?v=3","gravatar_id":"","url":"https://api.github.com/users/kgangwani","html_url":"https://github.com/kgangwani","followers_url":"https://api.github.com/users/kgangwani/followers","following_url":"https://api.github.com/users/kgangwani/following{/other_user}","gists_url":"https://api.github.com/users/kgangwani/gists{/gist_id}","starred_url":"https://api.github.com/users/kgangwani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kgangwani/subscriptions","organizations_url":"https://api.github.com/users/kgangwani/orgs","repos_url":"https://api.github.com/users/kgangwani/repos","events_url":"https://api.github.com/users/kgangwani/events{/privacy}","received_events_url":"https://api.github.com/users/kgangwani/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/lookout/borderpatrol/pulls/189/commits","review_comments_url":"https://api.github.com/repos/lookout/borderpatrol/pulls/189/comments","review_comment_url":"https://api.github.com/repos/lookout/borderpatrol/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lookout/borderpatrol/issues/189/comments","statuses_url":"https://api.github.com/repos/lookout/borderpatrol/statuses/2ac391598261cd3021c50dbedc881be1595c8386","head":{"label":"rikesh-chouhan:master","ref":"master","sha":"2ac391598261cd3021c50dbedc881be1595c8386","user":{"login":"rikesh-chouhan","id":15759837,"avatar_url":"https://avatars.githubusercontent.com/u/15759837?v=3","gravatar_id":"","url":"https://api.github.com/users/rikesh-chouhan","html_url":"https://github.com/rikesh-chouhan","followers_url":"https://api.github.com/users/rikesh-chouhan/followers","following_url":"https://api.github.com/users/rikesh-chouhan/following{/other_user}","gists_url":"https://api.github.com/users/rikesh-chouhan/gists{/gist_id}","starred_url":"https://api.github.com/users/rikesh-chouhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rikesh-chouhan/subscriptions","organizations_url":"https://api.github.com/users/rikesh-chouhan/orgs","repos_url":"https://api.github.com/users/rikesh-chouhan/repos","events_url":"https://api.github.com/users/rikesh-chouhan/events{/privacy}","received_events_url":"https://api.github.com/users/rikesh-chouhan/received_events","type":"User","site_admin":false},"repo":{"id":63189042,"name":"borderpatrol","full_name":"rikesh-chouhan/borderpatrol","owner":{"login":"rikesh-chouhan","id":15759837,"avatar_url":"https://avatars.githubusercontent.com/u/15759837?v=3","gravatar_id":"","url":"https://api.github.com/users/rikesh-chouhan","html_url":"https://github.com/rikesh-chouhan","followers_url":"https://api.github.com/users/rikesh-chouhan/followers","following_url":"https://api.github.com/users/rikesh-chouhan/following{/other_user}","gists_url":"https://api.github.com/users/rikesh-chouhan/gists{/gist_id}","starred_url":"https://api.github.com/users/rikesh-chouhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rikesh-chouhan/subscriptions","organizations_url":"https://api.github.com/users/rikesh-chouhan/orgs","repos_url":"https://api.github.com/users/rikesh-chouhan/repos","events_url":"https://api.github.com/users/rikesh-chouhan/events{/privacy}","received_events_url":"https://api.github.com/users/rikesh-chouhan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rikesh-chouhan/borderpatrol","description":"Service for web sessions and authentication in an SOA","fork":true,"url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol","forks_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/forks","keys_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/teams","hooks_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/hooks","issue_events_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/issues/events{/number}","events_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/events","assignees_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/assignees{/user}","branches_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/branches{/branch}","tags_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/tags","blobs_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/git/refs{/sha}","trees_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/statuses/{sha}","languages_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/languages","stargazers_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/stargazers","contributors_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/contributors","subscribers_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/subscribers","subscription_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/subscription","commits_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/commits{/sha}","git_commits_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/git/commits{/sha}","comments_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/comments{/number}","issue_comment_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/issues/comments{/number}","contents_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/contents/{+path}","compare_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/merges","archive_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/downloads","issues_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/issues{/number}","pulls_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/pulls{/number}","milestones_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/milestones{/number}","notifications_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/labels{/name}","releases_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/releases{/id}","deployments_url":"https://api.github.com/repos/rikesh-chouhan/borderpatrol/deployments","created_at":"2016-07-12T20:07:30Z","updated_at":"2016-07-12T20:07:31Z","pushed_at":"2016-08-05T16:52:43Z","git_url":"git://github.com/rikesh-chouhan/borderpatrol.git","ssh_url":"git@github.com:rikesh-chouhan/borderpatrol.git","clone_url":"https://github.com/rikesh-chouhan/borderpatrol.git","svn_url":"https://github.com/rikesh-chouhan/borderpatrol","homepage":"http://hackers.lookout.com/2014/06/introducing-borderpatrol/","size":2045,"stargazers_count":0,"watchers_count":0,"language":"Scala","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":"lookout:master","ref":"master","sha":"1f05f97d536e759d9bcf3a939c60ff5ec4549424","user":{"login":"lookout","id":47237,"avatar_url":"https://avatars.githubusercontent.com/u/47237?v=3","gravatar_id":"","url":"https://api.github.com/users/lookout","html_url":"https://github.com/lookout","followers_url":"https://api.github.com/users/lookout/followers","following_url":"https://api.github.com/users/lookout/following{/other_user}","gists_url":"https://api.github.com/users/lookout/gists{/gist_id}","starred_url":"https://api.github.com/users/lookout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lookout/subscriptions","organizations_url":"https://api.github.com/users/lookout/orgs","repos_url":"https://api.github.com/users/lookout/repos","events_url":"https://api.github.com/users/lookout/events{/privacy}","received_events_url":"https://api.github.com/users/lookout/received_events","type":"Organization","site_admin":false},"repo":{"id":20500575,"name":"borderpatrol","full_name":"lookout/borderpatrol","owner":{"login":"lookout","id":47237,"avatar_url":"https://avatars.githubusercontent.com/u/47237?v=3","gravatar_id":"","url":"https://api.github.com/users/lookout","html_url":"https://github.com/lookout","followers_url":"https://api.github.com/users/lookout/followers","following_url":"https://api.github.com/users/lookout/following{/other_user}","gists_url":"https://api.github.com/users/lookout/gists{/gist_id}","starred_url":"https://api.github.com/users/lookout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lookout/subscriptions","organizations_url":"https://api.github.com/users/lookout/orgs","repos_url":"https://api.github.com/users/lookout/repos","events_url":"https://api.github.com/users/lookout/events{/privacy}","received_events_url":"https://api.github.com/users/lookout/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lookout/borderpatrol","description":"Service for web sessions and authentication in an SOA","fork":false,"url":"https://api.github.com/repos/lookout/borderpatrol","forks_url":"https://api.github.com/repos/lookout/borderpatrol/forks","keys_url":"https://api.github.com/repos/lookout/borderpatrol/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lookout/borderpatrol/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lookout/borderpatrol/teams","hooks_url":"https://api.github.com/repos/lookout/borderpatrol/hooks","issue_events_url":"https://api.github.com/repos/lookout/borderpatrol/issues/events{/number}","events_url":"https://api.github.com/repos/lookout/borderpatrol/events","assignees_url":"https://api.github.com/repos/lookout/borderpatrol/assignees{/user}","branches_url":"https://api.github.com/repos/lookout/borderpatrol/branches{/branch}","tags_url":"https://api.github.com/repos/lookout/borderpatrol/tags","blobs_url":"https://api.github.com/repos/lookout/borderpatrol/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lookout/borderpatrol/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lookout/borderpatrol/git/refs{/sha}","trees_url":"https://api.github.com/repos/lookout/borderpatrol/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lookout/borderpatrol/statuses/{sha}","languages_url":"https://api.github.com/repos/lookout/borderpatrol/languages","stargazers_url":"https://api.github.com/repos/lookout/borderpatrol/stargazers","contributors_url":"https://api.github.com/repos/lookout/borderpatrol/contributors","subscribers_url":"https://api.github.com/repos/lookout/borderpatrol/subscribers","subscription_url":"https://api.github.com/repos/lookout/borderpatrol/subscription","commits_url":"https://api.github.com/repos/lookout/borderpatrol/commits{/sha}","git_commits_url":"https://api.github.com/repos/lookout/borderpatrol/git/commits{/sha}","comments_url":"https://api.github.com/repos/lookout/borderpatrol/comments{/number}","issue_comment_url":"https://api.github.com/repos/lookout/borderpatrol/issues/comments{/number}","contents_url":"https://api.github.com/repos/lookout/borderpatrol/contents/{+path}","compare_url":"https://api.github.com/repos/lookout/borderpatrol/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lookout/borderpatrol/merges","archive_url":"https://api.github.com/repos/lookout/borderpatrol/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lookout/borderpatrol/downloads","issues_url":"https://api.github.com/repos/lookout/borderpatrol/issues{/number}","pulls_url":"https://api.github.com/repos/lookout/borderpatrol/pulls{/number}","milestones_url":"https://api.github.com/repos/lookout/borderpatrol/milestones{/number}","notifications_url":"https://api.github.com/repos/lookout/borderpatrol/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lookout/borderpatrol/labels{/name}","releases_url":"https://api.github.com/repos/lookout/borderpatrol/releases{/id}","deployments_url":"https://api.github.com/repos/lookout/borderpatrol/deployments","created_at":"2014-06-04T21:00:49Z","updated_at":"2016-05-27T08:26:39Z","pushed_at":"2016-08-05T16:52:43Z","git_url":"git://github.com/lookout/borderpatrol.git","ssh_url":"git@github.com:lookout/borderpatrol.git","clone_url":"https://github.com/lookout/borderpatrol.git","svn_url":"https://github.com/lookout/borderpatrol","homepage":"http://hackers.lookout.com/2014/06/introducing-borderpatrol/","size":2220,"stargazers_count":19,"watchers_count":19,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":15,"mirror_url":null,"open_issues_count":17,"forks":15,"open_issues":17,"watchers":19,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lookout/borderpatrol/pulls/189"},"html":{"href":"https://github.com/lookout/borderpatrol/pull/189"},"issue":{"href":"https://api.github.com/repos/lookout/borderpatrol/issues/189"},"comments":{"href":"https://api.github.com/repos/lookout/borderpatrol/issues/189/comments"},"review_comments":{"href":"https://api.github.com/repos/lookout/borderpatrol/pulls/189/comments"},"review_comment":{"href":"https://api.github.com/repos/lookout/borderpatrol/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lookout/borderpatrol/pulls/189/commits"},"statuses":{"href":"https://api.github.com/repos/lookout/borderpatrol/statuses/2ac391598261cd3021c50dbedc881be1595c8386"}}}}
{"actor":{"display_login":"maheshkelkar"}}