forked from WebGoat/WebGoat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check host header instead of origin which might not be present WebGoa…
- Loading branch information
1 parent
1d2575a
commit 3b9b695
Showing
2 changed files
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ public void csrfAttack() throws Exception { | |
mockMvc.perform(post("/csrf/feedback/message") | ||
.contentType(MediaType.TEXT_PLAIN) | ||
.cookie(new Cookie("JSESSIONID", "test")) | ||
.header("origin", "localhost:8080") | ||
.header("host", "localhost:8080") | ||
.header("referer", "webgoat.org") | ||
.content("{\"name\": \"Test\", \"email\": \"[email protected]\", \"subject\": \"service\", \"message\":\"dsaffd\"}")) | ||
.andExpect(jsonPath("lessonCompleted", is(true))) | ||
|