Skip to content

Commit

Permalink
Most tests
Browse files Browse the repository at this point in the history
  • Loading branch information
clamey committed May 11, 2022
1 parent 1c110e6 commit bc45ebb
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,17 @@ class PathTraversalCheckApplicationTests(@Autowired val mockMvc: MockMvc) {
getPath("/hello", HttpStatus.OK)

getPath("/../usr_content.bak/hello", HttpStatus.INTERNAL_SERVER_ERROR)
getPath("/../usr_content.bak/../../etc/passwd", HttpStatus.INTERNAL_SERVER_ERROR)
getPath("/../../usr_content.bak/hello", HttpStatus.INTERNAL_SERVER_ERROR)
getPath("/./user_content.bak/hello", HttpStatus.INTERNAL_SERVER_ERROR)
getPath("/usr_content.bak/hello", HttpStatus.INTERNAL_SERVER_ERROR)

getPath("/../usr_content/hello", HttpStatus.INTERNAL_SERVER_ERROR)
getPath("/../usr_content/hello/../../etc/passwd", HttpStatus.INTERNAL_SERVER_ERROR)

getPath("hello", HttpStatus.INTERNAL_SERVER_ERROR)
getPath("../hello", HttpStatus.INTERNAL_SERVER_ERROR)
getPath("/hello/../../etc/passwd", HttpStatus.INTERNAL_SERVER_ERROR)
}

fun getPath(path: String, status: HttpStatus) {
Expand Down

0 comments on commit bc45ebb

Please sign in to comment.