An INSERT statement cannot be executed as a query
git-svn-id: http://webgoat.googlecode.com/svn/trunk@191 4033779f-a91e-0410-96ef-6bf7bf53c507
This commit is contained in:
parent
d04371884b
commit
cf047786f3
@ -107,7 +107,7 @@ public class StoredXss extends LessonAdapter
|
|||||||
statement.setString(2, title);
|
statement.setString(2, title);
|
||||||
statement.setString(3, message);
|
statement.setString(3, message);
|
||||||
statement.setString(4, s.getUserName());
|
statement.setString(4, s.getUserName());
|
||||||
statement.executeQuery();
|
statement.execute();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@ -118,6 +118,7 @@ public class StoredXss extends LessonAdapter
|
|||||||
{
|
{
|
||||||
s.setMessage("Could not add message to database");
|
s.setMessage("Could not add message to database");
|
||||||
}
|
}
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user