From 20b8e5ed160991f12e059e7aed34f1bef8868482 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Capon?= <46624375+FrancoisCapon@users.noreply.github.com> Date: Sun, 15 Sep 2024 12:35:53 +0200 Subject: [PATCH 1/2] ./mvnw spotless:apply ``` [INFO] --- spotless-maven-plugin:2.41.1:apply (default-cli) @ webgoat --- [INFO] Writing clean file: /home/ulyssa/labs/WebGoat/WebGoat-bb6e84d/src/main/java/org/owasp/webgoat/lessons/sqlinjection/introduction/SqlInjectionLesson5a.java ``` --- .../sqlinjection/introduction/SqlInjectionLesson5a.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/owasp/webgoat/lessons/sqlinjection/introduction/SqlInjectionLesson5a.java b/src/main/java/org/owasp/webgoat/lessons/sqlinjection/introduction/SqlInjectionLesson5a.java index 59a29ff103..65c103d0f5 100644 --- a/src/main/java/org/owasp/webgoat/lessons/sqlinjection/introduction/SqlInjectionLesson5a.java +++ b/src/main/java/org/owasp/webgoat/lessons/sqlinjection/introduction/SqlInjectionLesson5a.java @@ -41,8 +41,8 @@ public class SqlInjectionLesson5a extends AssignmentEndpoint { + " '1' always evaluates to true (The string ending literal for '1 is closed by" + " the query itself, so you should not inject it). So the injected query basically looks" + " like this: SELECT * FROM user_data WHERE" - + " first_name = 'John' and last_name = '' or TRUE, which will always evaluate to" - + " true, no matter what came before it."; + + " (first_name = 'John' and last_name = '') or (TRUE), which will always evaluate" + + " to true, no matter what came before it."; private final LessonDataSource dataSource; public SqlInjectionLesson5a(LessonDataSource dataSource) { From c69f6f18229df0ca4f972200de887810dbac45f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Capon?= <46624375+FrancoisCapon@users.noreply.github.com> Date: Sun, 15 Sep 2024 13:16:52 +0200 Subject: [PATCH 2/2] On reset lesson: reset form and quizzes colors --- .../webgoat/static/js/goatApp/view/LessonContentView.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/resources/webgoat/static/js/goatApp/view/LessonContentView.js b/src/main/resources/webgoat/static/js/goatApp/view/LessonContentView.js index 66c01605a0..5a7cb2ad51 100644 --- a/src/main/resources/webgoat/static/js/goatApp/view/LessonContentView.js +++ b/src/main/resources/webgoat/static/js/goatApp/view/LessonContentView.js @@ -147,7 +147,6 @@ define(['jquery', }, markAssignmentComplete: function () { - this.curForm.reset(); $(this.curForm).siblings('.assignment-success').find('i').removeClass('hidden'); this.paginationControlView.updateCollection(); }, @@ -222,6 +221,8 @@ define(['jquery', }, resetLesson: function () { + this.$el.find(form).trigger("reset"); + this.$el.find(".quiz_question").removeClass('correct incorrect'); this.$el.find('.attack-feedback').hide(); this.$el.find('.attack-output').hide(); this.markAssignmentIncomplete();