Skip to content

Commit

Permalink
Merge pull request WebGoat#618 from matthias-g/csrf-3-post
Browse files Browse the repository at this point in the history
Do not allow trivial solution to CSRF-3
  • Loading branch information
misfir3 authored Jul 12, 2019
2 parents 27125ac + 97f6654 commit e36b4c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class CSRFGetFlag extends Endpoint {
@Autowired
private PluginMessages pluginMessages;

@RequestMapping(produces = {"application/json"}, method = RequestMethod.GET)
@RequestMapping(produces = {"application/json"}, method = RequestMethod.POST)
@ResponseBody
public Map<String, Object> invoke(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

Expand Down
2 changes: 1 addition & 1 deletion webgoat-lessons/csrf/src/main/resources/html/CSRF.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div class="adoc-content" th:replace="doc:CSRF_Get_Flag.adoc"></div>

<form accept-charset="UNKNOWN" id="basic-csrf-get"
method="GET" name="form1"
method="POST" name="form1"
target="_blank"
successCallback=""
action="/WebGoat/csrf/basic-get-flag"
Expand Down

0 comments on commit e36b4c3

Please sign in to comment.