From 02e6b7bdcbb3ce2fb1e12296de3758fc88039812 Mon Sep 17 00:00:00 2001
From: SamHeadrickCx <96081318+SamHeadrickCx@users.noreply.github.com>
Date: Tue, 26 Apr 2022 08:46:14 -0400
Subject: [PATCH] Update SqlInjectionLesson5b.java
update SQL
---
.../sql_injection/introduction/SqlInjectionLesson5b.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5b.java b/webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5b.java
index 7b0f7effaf..1365e20586 100644
--- a/webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5b.java
+++ b/webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/introduction/SqlInjectionLesson5b.java
@@ -87,6 +87,8 @@ protected AttackResult injectableQuery(String login_count, String accountName) {
} else {
return failed(this).feedback("sql-injection.5b.no.results").output("Your query was: " + queryString.replace("?", login_count)).build();
}
+
+ results = query.executeQuery();
} catch (SQLException sqle) {
return failed(this).output(sqle.getMessage() + "
Your query was: " + queryString.replace("?", login_count)).build();
@@ -95,4 +97,4 @@ protected AttackResult injectableQuery(String login_count, String accountName) {
return failed(this).output(this.getClass().getName() + " : " + e.getMessage() + "
Your query was: " + queryString.replace("?", login_count)).build();
}
}
-}
\ No newline at end of file
+}