Skip to content

Commit

Permalink
[fix] path in HttpProxies html file was wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
hillstonenet-interns-bj authored and nbaars committed Mar 2, 2017
1 parent 26ab0dc commit f5c3610
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,15 @@ public class HttpBasicsInterceptRequest extends AssignmentEndpoint {
@RequestMapping(method = RequestMethod.GET)
public @ResponseBody
AttackResult completed(HttpServletRequest request) throws IOException {
if (request.getHeader("x-request-intercepted").toLowerCase().equals("true") && request.getParameter("changeMe").equals("Requests are tampered easily")) {
String header = null;
String param = null;
if (request != null && (header = request.getHeader("x-request-intercepted")) != null
&& header.toLowerCase().equals("true")
&& (param = request.getParameter("changeMe")) != null
&& param.equals("Requests are tampered easily")) {
return trackProgress(success().feedback("http-proxies.intercept.success").build());
} else {
return trackProgress(failed().feedback("http-proxies.intercept.failure").build());
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<div class="assignment-success"><i class="fa fa-2 fa-check hidden" aria-hidden="true"></i></div>
<form class="attack-form" accept-charset="UNKNOWN" name="intercept-request"
method="POST"
action="/WebGoat/HttpBasics/intercept-request"
action="/WebGoat/HttpProxies/intercept-request"
enctype="application/json;charset=UTF-8">

<input type="text" value="doesn't matter really" name="changeMe" />
Expand All @@ -48,4 +48,4 @@
<div class="attack-output"></div>
</div>
</div>
</html>
</html>

0 comments on commit f5c3610

Please sign in to comment.