Skip to content

Commit

Permalink
nixos/tests: test correct page with invalid path
Browse files Browse the repository at this point in the history
  • Loading branch information
newAM committed Jul 20, 2024
1 parent 9e7cdfa commit 8231da0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nixos/tests/basic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,11 @@ in
'curl -sS -b pages_cookies.txt -o /dev/null -w "%{http_code}" ${oidcPagesFrontendUrl}/p/top_secret/index.html | grep -q "^404$"',
)
# check that a correct page with invalid path results in a 404
machine.succeed(
'curl -sS -b pages_cookies.txt -o /dev/null -w "%{http_code}" ${oidcPagesFrontendUrl}/p/notes/not_a_real_page.html | grep -q "^404$"',
)
# basic directory traversal attack check
machine.succeed(
'curl -sS -b pages_cookies.txt -o /dev/null -w "%{http_code}" ${oidcPagesFrontendUrl}/p/notes/../../top_secret/index.html | grep -q "^404$"',
Expand Down

0 comments on commit 8231da0

Please sign in to comment.