Skip to content

Commit

Permalink
Merge pull request #1277 from gaol/test_undertow-1981
Browse files Browse the repository at this point in the history
[UNDERTOW-2025][UNDERTOW-1981] Test that client cannot access files inside of meta-info sub folder
  • Loading branch information
fl4via committed Feb 6, 2022
2 parents cda3aae + cd40388 commit 8531ff7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Expand Up @@ -259,6 +259,18 @@ public void testDisallowedResource() throws IOException {
}
}

@Test
public void testNoAccessToMetaInfResource() throws IOException {
TestHttpClient client = new TestHttpClient();
try {
HttpGet get = new HttpGet(DefaultServer.getDefaultServerURL() + "/servletContext/meta-inf/secret");
HttpResponse result = client.execute(get);
Assert.assertEquals(StatusCodes.NOT_FOUND, result.getStatusLine().getStatusCode());
} finally {
client.getConnectionManager().shutdown();
}
}

@Test
public void testDirectoryListing() throws IOException {
TestHttpClient client = new TestHttpClient();
Expand Down
@@ -0,0 +1 @@
confidential

0 comments on commit 8531ff7

Please sign in to comment.