Fixed issue with lesson tracking

This commit is contained in:
Nanne Baars
2016-11-15 09:28:39 +01:00
parent 0bec575913
commit 5babe19f2b
25 changed files with 306 additions and 554 deletions

View File

@ -1,7 +1,6 @@
package org.owasp.webgoat.plugin;
import org.owasp.webgoat.lessons.AssignmentEndpoint;
import org.owasp.webgoat.lessons.LessonEndpointMapping;
import org.owasp.webgoat.lessons.Assignment;
import org.owasp.webgoat.lessons.model.AttackResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@ -45,8 +44,7 @@ import java.io.IOException;
* @created October 28, 2003
*/
@LessonEndpointMapping
public class HttpBasicsLesson extends AssignmentEndpoint {
public class HttpBasicsLesson extends Assignment {
@RequestMapping(method = RequestMethod.POST)
public @ResponseBody AttackResult completed(@RequestParam String person, HttpServletRequest request) throws IOException {

View File

@ -1,17 +1,15 @@
package org.owasp.webgoat.plugin;
import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import org.owasp.webgoat.lessons.AssignmentEndpoint;
import org.owasp.webgoat.lessons.LessonEndpointMapping;
import org.owasp.webgoat.lessons.Assignment;
import org.owasp.webgoat.lessons.model.AttackResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
/**
* *************************************************************************************************
*
@ -46,8 +44,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
* @created October 28, 2003
*/
@LessonEndpointMapping
public class HttpBasicsQuiz extends AssignmentEndpoint {
public class HttpBasicsQuiz extends Assignment {
@RequestMapping(method = RequestMethod.POST)
public @ResponseBody AttackResult completed(@RequestParam String answer, @RequestParam String magic_answer, @RequestParam String magic_num, HttpServletRequest request) throws IOException {