{"action":"created","comment":{"url":"https://api.github.com/repos/wso2/product-ei/pulls/comments/151908541","pull_request_review_id":77689111,"id":151908541,"diff_hunk":"@@ -0,0 +1,60 @@\n+/*\n+*  Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.\n+*\n+*  WSO2 Inc. licenses this file to you under the Apache License,\n+*  Version 2.0 (the \"License\"); you may not use this file except\n+*  in compliance with the License.\n+*  You may obtain a copy of the License at\n+*\n+*    http://www.apache.org/licenses/LICENSE-2.0\n+*\n+* Unless required by applicable law or agreed to in writing,\n+* software distributed under the License is distributed on an\n+* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n+* KIND, either express or implied.  See the License for the\n+* specific language governing permissions and limitations\n+* under the License.\n+*/\n+\n+package org.wso2.carbon.esb.security.test.tryit;\n+\n+import org.testng.annotations.AfterClass;\n+import org.testng.annotations.BeforeClass;\n+import org.testng.annotations.Test;\n+import org.wso2.esb.integration.common.utils.ESBIntegrationTest;\n+\n+import java.io.IOException;\n+import java.net.HttpURLConnection;\n+import java.net.URL;\n+\n+import static org.testng.Assert.assertEquals;\n+\n+/**\n+ * Test class to test whether is it possible to read files outside the JAR using '?wsdl2form&contentType=text/html&resource=.'.\n+ */\n+public class ResourceRetrievalUsingWsdl2FormTestCase extends ESBIntegrationTest {\n+\n+    @BeforeClass(alwaysRun = true)\n+    public void init() throws Exception {\n+        super.init();\n+    }\n+\n+    @Test(groups = \"wso2.esb\",\n+          description = \"Tests wsdl2form arbitrary file retrieval\")\n+    public void testResourceRetrievalUsingWsdl2Form() throws InterruptedException, IOException {\n+        int expectedStatusCode = 400;\n+        String url = \"https://localhost:9643/services/echo?wsdl2form&contentType=text/html&resource=.\";","path":"integration/mediation-tests/tests-other/src/test/java/org/wso2/carbon/esb/security/test/tryit/ResourceRetrievalUsingWsdl2FormTestCase.java","position":null,"original_position":46,"commit_id":"a3e145eadbd68b654ed2db34d50d896cff1b8caf","original_commit_id":"b1326b0df12123d7e2b5e3612699e48c4d7cd95b","user":{"login":"ThishaniLucas","id":8208020,"avatar_url":"https://avatars1.githubusercontent.com/u/8208020?v=4","gravatar_id":"","url":"https://api.github.com/users/ThishaniLucas","html_url":"https://github.com/ThishaniLucas","followers_url":"https://api.github.com/users/ThishaniLucas/followers","following_url":"https://api.github.com/users/ThishaniLucas/following{/other_user}","gists_url":"https://api.github.com/users/ThishaniLucas/gists{/gist_id}","starred_url":"https://api.github.com/users/ThishaniLucas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThishaniLucas/subscriptions","organizations_url":"https://api.github.com/users/ThishaniLucas/orgs","repos_url":"https://api.github.com/users/ThishaniLucas/repos","events_url":"https://api.github.com/users/ThishaniLucas/events{/privacy}","received_events_url":"https://api.github.com/users/ThishaniLucas/received_events","type":"User","site_admin":false},"body":"done","created_at":"2017-11-20T06:13:26Z","updated_at":"2017-11-20T06:13:26Z","html_url":"https://github.com/wso2/product-ei/pull/1347#discussion_r151908541","pull_request_url":"https://api.github.com/repos/wso2/product-ei/pulls/1347","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/wso2/product-ei/pulls/comments/151908541"},"html":{"href":"https://github.com/wso2/product-ei/pull/1347#discussion_r151908541"},"pull_request":{"href":"https://api.github.com/repos/wso2/product-ei/pulls/1347"}},"in_reply_to_id":151647376},"pull_request":{"url":"https://api.github.com/repos/wso2/product-ei/pulls/1347","id":153256539,"html_url":"https://github.com/wso2/product-ei/pull/1347","diff_url":"https://github.com/wso2/product-ei/pull/1347.diff","patch_url":"https://github.com/wso2/product-ei/pull/1347.patch","issue_url":"https://api.github.com/repos/wso2/product-ei/issues/1347","number":1347,"state":"open","locked":false,"title":"Add test case to test how secure is the file retrieval outside jar","user":{"login":"ThishaniLucas","id":8208020,"avatar_url":"https://avatars1.githubusercontent.com/u/8208020?v=4","gravatar_id":"","url":"https://api.github.com/users/ThishaniLucas","html_url":"https://github.com/ThishaniLucas","followers_url":"https://api.github.com/users/ThishaniLucas/followers","following_url":"https://api.github.com/users/ThishaniLucas/following{/other_user}","gists_url":"https://api.github.com/users/ThishaniLucas/gists{/gist_id}","starred_url":"https://api.github.com/users/ThishaniLucas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThishaniLucas/subscriptions","organizations_url":"https://api.github.com/users/ThishaniLucas/orgs","repos_url":"https://api.github.com/users/ThishaniLucas/repos","events_url":"https://api.github.com/users/ThishaniLucas/events{/privacy}","received_events_url":"https://api.github.com/users/ThishaniLucas/received_events","type":"User","site_admin":false},"body":"## Purpose\r\n> Adding test case to test how secure is the file retrieval outside jar.\r\nPR sent to ESB : https://github.com/wso2/product-esb/pull/623\r\n\r\n","created_at":"2017-11-17T09:57:57Z","updated_at":"2017-11-20T06:13:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9a54b052f852c1bd7a4f1ad432ae6f6294b52598","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/wso2/product-ei/pulls/1347/commits","review_comments_url":"https://api.github.com/repos/wso2/product-ei/pulls/1347/comments","review_comment_url":"https://api.github.com/repos/wso2/product-ei/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wso2/product-ei/issues/1347/comments","statuses_url":"https://api.github.com/repos/wso2/product-ei/statuses/a3e145eadbd68b654ed2db34d50d896cff1b8caf","head":{"label":"ThishaniLucas:tryit-security-test","ref":"tryit-security-test","sha":"a3e145eadbd68b654ed2db34d50d896cff1b8caf","user":{"login":"ThishaniLucas","id":8208020,"avatar_url":"https://avatars1.githubusercontent.com/u/8208020?v=4","gravatar_id":"","url":"https://api.github.com/users/ThishaniLucas","html_url":"https://github.com/ThishaniLucas","followers_url":"https://api.github.com/users/ThishaniLucas/followers","following_url":"https://api.github.com/users/ThishaniLucas/following{/other_user}","gists_url":"https://api.github.com/users/ThishaniLucas/gists{/gist_id}","starred_url":"https://api.github.com/users/ThishaniLucas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThishaniLucas/subscriptions","organizations_url":"https://api.github.com/users/ThishaniLucas/orgs","repos_url":"https://api.github.com/users/ThishaniLucas/repos","events_url":"https://api.github.com/users/ThishaniLucas/events{/privacy}","received_events_url":"https://api.github.com/users/ThishaniLucas/received_events","type":"User","site_admin":false},"repo":{"id":101634591,"name":"product-ei","full_name":"ThishaniLucas/product-ei","owner":{"login":"ThishaniLucas","id":8208020,"avatar_url":"https://avatars1.githubusercontent.com/u/8208020?v=4","gravatar_id":"","url":"https://api.github.com/users/ThishaniLucas","html_url":"https://github.com/ThishaniLucas","followers_url":"https://api.github.com/users/ThishaniLucas/followers","following_url":"https://api.github.com/users/ThishaniLucas/following{/other_user}","gists_url":"https://api.github.com/users/ThishaniLucas/gists{/gist_id}","starred_url":"https://api.github.com/users/ThishaniLucas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThishaniLucas/subscriptions","organizations_url":"https://api.github.com/users/ThishaniLucas/orgs","repos_url":"https://api.github.com/users/ThishaniLucas/repos","events_url":"https://api.github.com/users/ThishaniLucas/events{/privacy}","received_events_url":"https://api.github.com/users/ThishaniLucas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ThishaniLucas/product-ei","description":null,"fork":true,"url":"https://api.github.com/repos/ThishaniLucas/product-ei","forks_url":"https://api.github.com/repos/ThishaniLucas/product-ei/forks","keys_url":"https://api.github.com/repos/ThishaniLucas/product-ei/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ThishaniLucas/product-ei/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ThishaniLucas/product-ei/teams","hooks_url":"https://api.github.com/repos/ThishaniLucas/product-ei/hooks","issue_events_url":"https://api.github.com/repos/ThishaniLucas/product-ei/issues/events{/number}","events_url":"https://api.github.com/repos/ThishaniLucas/product-ei/events","assignees_url":"https://api.github.com/repos/ThishaniLucas/product-ei/assignees{/user}","branches_url":"https://api.github.com/repos/ThishaniLucas/product-ei/branches{/branch}","tags_url":"https://api.github.com/repos/ThishaniLucas/product-ei/tags","blobs_url":"https://api.github.com/repos/ThishaniLucas/product-ei/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ThishaniLucas/product-ei/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ThishaniLucas/product-ei/git/refs{/sha}","trees_url":"https://api.github.com/repos/ThishaniLucas/product-ei/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ThishaniLucas/product-ei/statuses/{sha}","languages_url":"https://api.github.com/repos/ThishaniLucas/product-ei/languages","stargazers_url":"https://api.github.com/repos/ThishaniLucas/product-ei/stargazers","contributors_url":"https://api.github.com/repos/ThishaniLucas/product-ei/contributors","subscribers_url":"https://api.github.com/repos/ThishaniLucas/product-ei/subscribers","subscription_url":"https://api.github.com/repos/ThishaniLucas/product-ei/subscription","commits_url":"https://api.github.com/repos/ThishaniLucas/product-ei/commits{/sha}","git_commits_url":"https://api.github.com/repos/ThishaniLucas/product-ei/git/commits{/sha}","comments_url":"https://api.github.com/repos/ThishaniLucas/product-ei/comments{/number}","issue_comment_url":"https://api.github.com/repos/ThishaniLucas/product-ei/issues/comments{/number}","contents_url":"https://api.github.com/repos/ThishaniLucas/product-ei/contents/{+path}","compare_url":"https://api.github.com/repos/ThishaniLucas/product-ei/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ThishaniLucas/product-ei/merges","archive_url":"https://api.github.com/repos/ThishaniLucas/product-ei/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ThishaniLucas/product-ei/downloads","issues_url":"https://api.github.com/repos/ThishaniLucas/product-ei/issues{/number}","pulls_url":"https://api.github.com/repos/ThishaniLucas/product-ei/pulls{/number}","milestones_url":"https://api.github.com/repos/ThishaniLucas/product-ei/milestones{/number}","notifications_url":"https://api.github.com/repos/ThishaniLucas/product-ei/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ThishaniLucas/product-ei/labels{/name}","releases_url":"https://api.github.com/repos/ThishaniLucas/product-ei/releases{/id}","deployments_url":"https://api.github.com/repos/ThishaniLucas/product-ei/deployments","created_at":"2017-08-28T11:07:47Z","updated_at":"2017-08-28T11:08:10Z","pushed_at":"2017-11-20T06:12:23Z","git_url":"git://github.com/ThishaniLucas/product-ei.git","ssh_url":"git@github.com:ThishaniLucas/product-ei.git","clone_url":"https://github.com/ThishaniLucas/product-ei.git","svn_url":"https://github.com/ThishaniLucas/product-ei","homepage":null,"size":42933,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"wso2:master","ref":"master","sha":"8db8ba755506187cc5ceee2333c89b46c2d77b2e","user":{"login":"wso2","id":533043,"avatar_url":"https://avatars3.githubusercontent.com/u/533043?v=4","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"repo":{"id":77035252,"name":"product-ei","full_name":"wso2/product-ei","owner":{"login":"wso2","id":533043,"avatar_url":"https://avatars3.githubusercontent.com/u/533043?v=4","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wso2/product-ei","description":null,"fork":false,"url":"https://api.github.com/repos/wso2/product-ei","forks_url":"https://api.github.com/repos/wso2/product-ei/forks","keys_url":"https://api.github.com/repos/wso2/product-ei/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2/product-ei/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2/product-ei/teams","hooks_url":"https://api.github.com/repos/wso2/product-ei/hooks","issue_events_url":"https://api.github.com/repos/wso2/product-ei/issues/events{/number}","events_url":"https://api.github.com/repos/wso2/product-ei/events","assignees_url":"https://api.github.com/repos/wso2/product-ei/assignees{/user}","branches_url":"https://api.github.com/repos/wso2/product-ei/branches{/branch}","tags_url":"https://api.github.com/repos/wso2/product-ei/tags","blobs_url":"https://api.github.com/repos/wso2/product-ei/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2/product-ei/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2/product-ei/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2/product-ei/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2/product-ei/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2/product-ei/languages","stargazers_url":"https://api.github.com/repos/wso2/product-ei/stargazers","contributors_url":"https://api.github.com/repos/wso2/product-ei/contributors","subscribers_url":"https://api.github.com/repos/wso2/product-ei/subscribers","subscription_url":"https://api.github.com/repos/wso2/product-ei/subscription","commits_url":"https://api.github.com/repos/wso2/product-ei/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2/product-ei/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2/product-ei/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2/product-ei/issues/comments{/number}","contents_url":"https://api.github.com/repos/wso2/product-ei/contents/{+path}","compare_url":"https://api.github.com/repos/wso2/product-ei/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2/product-ei/merges","archive_url":"https://api.github.com/repos/wso2/product-ei/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2/product-ei/downloads","issues_url":"https://api.github.com/repos/wso2/product-ei/issues{/number}","pulls_url":"https://api.github.com/repos/wso2/product-ei/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2/product-ei/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2/product-ei/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2/product-ei/labels{/name}","releases_url":"https://api.github.com/repos/wso2/product-ei/releases{/id}","deployments_url":"https://api.github.com/repos/wso2/product-ei/deployments","created_at":"2016-12-21T09:00:01Z","updated_at":"2017-11-06T08:55:59Z","pushed_at":"2017-11-20T06:12:24Z","git_url":"git://github.com/wso2/product-ei.git","ssh_url":"git@github.com:wso2/product-ei.git","clone_url":"https://github.com/wso2/product-ei.git","svn_url":"https://github.com/wso2/product-ei","homepage":null,"size":43010,"stargazers_count":20,"watchers_count":20,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":63,"mirror_url":null,"archived":false,"open_issues_count":287,"forks":63,"open_issues":287,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2/product-ei/pulls/1347"},"html":{"href":"https://github.com/wso2/product-ei/pull/1347"},"issue":{"href":"https://api.github.com/repos/wso2/product-ei/issues/1347"},"comments":{"href":"https://api.github.com/repos/wso2/product-ei/issues/1347/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2/product-ei/pulls/1347/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2/product-ei/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wso2/product-ei/pulls/1347/commits"},"statuses":{"href":"https://api.github.com/repos/wso2/product-ei/statuses/a3e145eadbd68b654ed2db34d50d896cff1b8caf"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ThishaniLucas"}}