From 5a16ea514addb16d3e26fa94a6c02042433c313f Mon Sep 17 00:00:00 2001 From: Nanne Baars Date: Sun, 14 Mar 2021 15:56:38 +0100 Subject: [PATCH] Fix quiz --- .../test/java/org/owasp/webgoat/JWTLessonTest.java | 2 +- .../src/main/java/org/owasp/webgoat/jwt/JWTQuiz.java | 2 +- .../jwt/src/main/resources/js/questions_jwt.json | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/webgoat-integration-tests/src/test/java/org/owasp/webgoat/JWTLessonTest.java b/webgoat-integration-tests/src/test/java/org/owasp/webgoat/JWTLessonTest.java index 8913e4351..4a6513440 100644 --- a/webgoat-integration-tests/src/test/java/org/owasp/webgoat/JWTLessonTest.java +++ b/webgoat-integration-tests/src/test/java/org/owasp/webgoat/JWTLessonTest.java @@ -210,7 +210,7 @@ public class JWTLessonTest extends IntegrationTest { private void quiz() { Map params = new HashMap<>(); params.put("question_0_solution", "Solution 1"); - params.put("question_1_solution", "Solution 2"); + params.put("question_1_solution", "Solution 3"); checkAssignment(url("/WebGoat/JWT/quiz"), params, true); } diff --git a/webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTQuiz.java b/webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTQuiz.java index 0eebc255b..256e4be2e 100644 --- a/webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTQuiz.java +++ b/webgoat-lessons/jwt/src/main/java/org/owasp/webgoat/jwt/JWTQuiz.java @@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RestController; @RestController public class JWTQuiz extends AssignmentEndpoint { - private final String[] solutions = {"Solution 1", "Solution 2"}; + private final String[] solutions = {"Solution 1", "Solution 3"}; private final boolean[] guesses = new boolean[solutions.length]; @PostMapping("/JWT/quiz") diff --git a/webgoat-lessons/jwt/src/main/resources/js/questions_jwt.json b/webgoat-lessons/jwt/src/main/resources/js/questions_jwt.json index f9e19bb7b..28ad27a46 100644 --- a/webgoat-lessons/jwt/src/main/resources/js/questions_jwt.json +++ b/webgoat-lessons/jwt/src/main/resources/js/questions_jwt.json @@ -3,17 +3,17 @@ { "text": "What is the result of the first code snippet?", "solutions": { - "1": "Throws an exception in line 13", - "2": "Invoked the method removeAllUsers at line 8", - "3": "Logs an error in line 10" + "1": "Throws an exception in line 12", + "2": "Invoked the method removeAllUsers at line 7", + "3": "Logs an error in line 9" } }, { "text": "What is the result of the second code snippet?", "solutions": { - "1": "Throws an exception in line 13", - "2": "Invoked the method removeAllUsers at line 8", - "3": "Logs an error in line 10" + "1": "Throws an exception in line 12", + "2": "Invoked the method removeAllUsers at line 7", + "3": "Logs an error in line 9" } } ]