");
if (results.next()) {
diff --git a/src/main/java/org/owasp/webgoat/lessons/sql_injection/introduction/SqlInjectionLesson9.java b/src/main/java/org/owasp/webgoat/lessons/sql_injection/introduction/SqlInjectionLesson9.java
index 77dab2cea..16b60b19d 100644
--- a/src/main/java/org/owasp/webgoat/lessons/sql_injection/introduction/SqlInjectionLesson9.java
+++ b/src/main/java/org/owasp/webgoat/lessons/sql_injection/introduction/SqlInjectionLesson9.java
@@ -57,7 +57,7 @@ public class SqlInjectionLesson9 extends AssignmentEndpoint {
}
protected AttackResult injectableQueryIntegrity(String name, String auth_tan) {
- StringBuffer output = new StringBuffer();
+ StringBuilder output = new StringBuilder();
String query = "SELECT * FROM employees WHERE last_name = '" + name + "' AND auth_tan = '" + auth_tan + "'";
try (Connection connection = dataSource.getConnection()) {
try {
@@ -86,7 +86,7 @@ public class SqlInjectionLesson9 extends AssignmentEndpoint {
}
}
- private AttackResult checkSalaryRanking(Connection connection, StringBuffer output) {
+ private AttackResult checkSalaryRanking(Connection connection, StringBuilder output) {
try {
String query = "SELECT * FROM employees ORDER BY salary DESC";
try (Statement statement = connection.createStatement(TYPE_SCROLL_SENSITIVE, CONCUR_UPDATABLE);
diff --git a/src/main/java/org/owasp/webgoat/lessons/ssrf/SSRFTask1.java b/src/main/java/org/owasp/webgoat/lessons/ssrf/SSRFTask1.java
index 5b797db24..6f12b3d9d 100644
--- a/src/main/java/org/owasp/webgoat/lessons/ssrf/SSRFTask1.java
+++ b/src/main/java/org/owasp/webgoat/lessons/ssrf/SSRFTask1.java
@@ -43,7 +43,7 @@ public class SSRFTask1 extends AssignmentEndpoint {
protected AttackResult stealTheCheese(String url) {
try {
- StringBuffer html = new StringBuffer();
+ StringBuilder html = new StringBuilder();
if (url.matches("images/tom.png")) {
html.append("
");
diff --git a/src/main/java/org/owasp/webgoat/lessons/xss/CrossSiteScriptingLesson5a.java b/src/main/java/org/owasp/webgoat/lessons/xss/CrossSiteScriptingLesson5a.java
index 6c679c819..9a7c1135a 100644
--- a/src/main/java/org/owasp/webgoat/lessons/xss/CrossSiteScriptingLesson5a.java
+++ b/src/main/java/org/owasp/webgoat/lessons/xss/CrossSiteScriptingLesson5a.java
@@ -61,7 +61,7 @@ public class CrossSiteScriptingLesson5a extends AssignmentEndpoint {
double totalSale = QTY1.intValue() * 69.99 + QTY2.intValue() * 27.99 + QTY3.intValue() * 1599.99 + QTY4.intValue() * 299.99;
userSessionData.setValue("xss-reflected1-complete", "false");
- StringBuffer cart = new StringBuffer();
+ StringBuilder cart = new StringBuilder();
cart.append("Thank you for shopping at WebGoat.
Your support is appreciated
");
cart.append("We have charged credit card:" + field1 + "
");
cart.append(" -------------------
");
diff --git a/src/main/resources/lessons/client_side_filtering/lessonSolutions/en/ClientSideFiltering.html b/src/main/resources/lessons/client_side_filtering/lessonSolutions/en/ClientSideFiltering.html
index 3a67cfb18..3dc36ab2d 100644
--- a/src/main/resources/lessons/client_side_filtering/lessonSolutions/en/ClientSideFiltering.html
+++ b/src/main/resources/lessons/client_side_filtering/lessonSolutions/en/ClientSideFiltering.html
@@ -51,7 +51,7 @@ even if it is hidden it is easy to find the sensitive date. In this
stage you will add a filter to the XPath queries. In this file you will find
following construct:
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append("/Employees/Employee/UserID | ");
sb.append("/Employees/Employee/FirstName | ");
@@ -66,7 +66,7 @@ This string will be used for the XPath query. You have to guarantee that a mange
can see employees which are working for him. To archive this you can use
filters in XPath. Following code will exactly do this:
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append("/Employees/Employee[Managers/Manager/text() = " + userId + "]/UserID | ");
sb.append("/Employees/Employee[Managers/Manager/text() = " + userId + "]/FirstName | ");
@@ -81,4 +81,4 @@ Now only information is sent to your client you are authorized for. You can clic