Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@

package org.owasp.webgoat.client_side_filtering;

import lombok.SneakyThrows;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.ClassPathResource;
import org.springframework.util.FileCopyUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
Expand All @@ -47,6 +47,7 @@
import java.util.List;
import java.util.Map;

@RestController
public class Salaries { // {extends Endpoint {

@Value("${webgoat.user.directory}")
Expand All @@ -66,7 +67,7 @@ public void copyFiles() {
}
}

@RequestMapping(produces = {"application/json"})
@GetMapping("clientSideFiltering/salaries")
@ResponseBody
public List<Map<String, Object>> invoke() throws ServletException, IOException {
NodeList nodes = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public ResponseEntity follow(@RequestBody(required = false) Map<String, Object>
String user = (String) json.get("user");
String password = (String) json.get("password");

if ("Jerry".equals(user) && PASSWORD.equals(password)) {
if ("Jerry".equalsIgnoreCase(user) && PASSWORD.equals(password)) {
return ok(createNewTokens(user));
}
return ResponseEntity.status(HttpStatus.UNAUTHORIZED).build();
Expand Down
1 change: 1 addition & 0 deletions webgoat-lessons/jwt/src/main/resources/html/JWT.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ <h3>Vote for your favorite</h3>
<link rel="stylesheet" type="text/css" th:href="@{/lesson_css/jwt.css}"/>
<script th:src="@{/lesson_js/bootstrap.min.js}" language="JavaScript"></script>
<script th:src="@{/lesson_js/jwt-buy.js}" language="JavaScript"></script>
<script th:src="@{/lesson_js/jwt-refresh.js}" language="JavaScript"></script>
<div class="attack-container">
<div class="assignment-success"><i class="fa fa-2 fa-check hidden" aria-hidden="true"></i></div>
<form class="attack-form" accept-charset="UNKNOWN"
Expand Down
2 changes: 1 addition & 1 deletion webgoat-lessons/jwt/src/main/resources/js/jwt-voting.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function vote(title) {
} else {
$.ajax({
type: 'POST',
url: 'JWT/votings/vote/' + title
url: 'JWT/votings/' + title
}).then(
function () {
getVotings();
Expand Down
3 changes: 3 additions & 0 deletions webgoat-lessons/sol.MD
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
https://github.com/WebGoat/WebGoat/wiki/(Almost)-Fully-Documented-Solution-(en)


### SQLi ###

Basic
Expand Down