From 6699456ee1fac49075ecdeb3d09df53045d1e24a Mon Sep 17 00:00:00 2001 From: malikashish8 Date: Fri, 26 Oct 2018 22:29:44 +1100 Subject: [PATCH] Bug fix in sample code --- .../main/resources/lessonPlans/en/SqlInjection_content9.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webgoat-lessons/sql-injection/src/main/resources/lessonPlans/en/SqlInjection_content9.adoc b/webgoat-lessons/sql-injection/src/main/resources/lessonPlans/en/SqlInjection_content9.adoc index 196c958ab..996b6ac3a 100644 --- a/webgoat-lessons/sql-injection/src/main/resources/lessonPlans/en/SqlInjection_content9.adoc +++ b/webgoat-lessons/sql-injection/src/main/resources/lessonPlans/en/SqlInjection_content9.adoc @@ -11,7 +11,7 @@ PreparedStatement ps = null; RecordSet rs = null; try { pUserName = request.getParameter("UserName"); - if ( isUsernameValid (pUsername); + if ( isUsernameValid (pUsername) ) { ps = conn.prepareStatement("SELECT * FROM user_table WHERE username = ? "); ps.setString(1, pUsername); @@ -22,4 +22,4 @@ try { } else { // handle invalid input } } catch (…) { // handle all exceptions … } ----- \ No newline at end of file +----