diff --git a/pom.xml b/pom.xml index 0f1478b..81b58d9 100644 --- a/pom.xml +++ b/pom.xml @@ -49,7 +49,7 @@ io.undertow undertow-core - 2.3.22.Final + 2.0.9.Final javax.servlet diff --git a/src/main/webapp/vulnerability/forum.jsp b/src/main/webapp/vulnerability/forum.jsp index 20434e1..e6383b5 100644 --- a/src/main/webapp/vulnerability/forum.jsp +++ b/src/main/webapp/vulnerability/forum.jsp @@ -45,13 +45,13 @@ { Statement stmt = con.createStatement(); //Posting Content - //stmt.executeUpdate("INSERT into posts(content,title,user) values ('"+content+"','"+title+"','"+user+"')"); - String sql = "INSERT into posts(content,title,user) values (?,?,?)" - PreparedStatement prepStmt = con.preparedStatement(sql); - prepStmt.setString(1,content); - prepStmt.setString(2,title); - prepStmt.setString(3,user); - prepStmt.executeQuery(); + stmt.executeUpdate("INSERT into posts(content,title,user) values ('"+content+"','"+title+"','"+user+"')"); + //String sql = "INSERT into posts(content,title,user) values (?,?,?)" + //PreparedStatement prepStmt = con.preparedStatement(sql); + //prepStmt.setString(1,content); + //prepStmt.setString(2,title); + //prepStmt.setString(3,user); + //prepStmt.executeQuery(); out.print("Successfully posted"); } }