Skip to content

Commit

Permalink
More tests
Browse files Browse the repository at this point in the history
  • Loading branch information
clamey committed May 11, 2022
1 parent bc45ebb commit 9cafb63
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ class PathTraversalCheckApplicationTests(@Autowired val mockMvc: MockMvc) {
}

@Test
fun `test paths`() {
fun `test intentional vulnerability file`() {
mockMvc.perform(MockMvcRequestBuilders.get("/file?filePath=/etc/passwd"))
.andExpect(MockMvcResultMatchers.status().isOk)
}

@Test
fun `test file check`() {
getPath("/hello", HttpStatus.OK)

getPath("/../usr_content.bak/hello", HttpStatus.INTERNAL_SERVER_ERROR)
Expand Down

0 comments on commit 9cafb63

Please sign in to comment.