diff --git a/webgoat-lessons/cia/src/main/resources/js/questions_cia.json b/webgoat-lessons/cia/src/main/resources/js/questions_cia.json index 59272ee59..4c43fae60 100644 --- a/webgoat-lessons/cia/src/main/resources/js/questions_cia.json +++ b/webgoat-lessons/cia/src/main/resources/js/questions_cia.json @@ -29,7 +29,7 @@ "1": "A system can be considered safe until all the goals are harmed. Harming one goal has no effect on the systems security.", "2": "The systems security is compromised even if only one goal is harmed.", "3": "It's not that bad when an attacker reads or changes data, at least some data is still available, hence only when the goal of availability is harmed the security of the system is compromised.", - "4": "It shouldn't be possible for an attacker to change data or make it unavailable, but reading sensitive data is not tolerable. Theres only a problem when confidentiality is harmed." + "4": "It shouldn't be a problem if an attacker changes data or makes it unavailable, but reading sensitive data is not tolerable. Theres only a problem when confidentiality is harmed." } }] } \ No newline at end of file diff --git a/webgoat-lessons/cross-site-scripting/src/main/java/org/owasp/webgoat/plugin/CrossSiteScriptingLesson5a.java b/webgoat-lessons/cross-site-scripting/src/main/java/org/owasp/webgoat/plugin/CrossSiteScriptingLesson5a.java index e88a26f0f..18946e22c 100644 --- a/webgoat-lessons/cross-site-scripting/src/main/java/org/owasp/webgoat/plugin/CrossSiteScriptingLesson5a.java +++ b/webgoat-lessons/cross-site-scripting/src/main/java/org/owasp/webgoat/plugin/CrossSiteScriptingLesson5a.java @@ -58,9 +58,13 @@ public class CrossSiteScriptingLesson5a extends AssignmentEndpoint { public @ResponseBody AttackResult completed(@RequestParam Integer QTY1, @RequestParam Integer QTY2, @RequestParam Integer QTY3, @RequestParam Integer QTY4, @RequestParam String field1, - @RequestParam Integer field2, HttpServletRequest request) + @RequestParam String field2, HttpServletRequest request) throws IOException { + if (field2.toLowerCase().matches("")) { + if (field1.toLowerCase().matches("". \ No newline at end of file +An easy way to find out if a field is vulnerable to an XSS attack is to use the _alert()_ or _console.log()_ methods. Use one of them to find out which field is vulnerable. \ No newline at end of file