Update solutions to match minor changes to the underlying lesson

git-svn-id: http://webgoat.googlecode.com/svn/trunk@153 4033779f-a91e-0410-96ef-6bf7bf53c507
This commit is contained in:
rogan.dawes 2007-07-10 11:57:02 +00:00
parent 1153caa7ff
commit ac43a1c3cb
4 changed files with 6 additions and 7 deletions

View File

@ -31,7 +31,7 @@ public class DeleteProfile_i extends DeleteProfile
//System.out.println("Query: " + query); //System.out.println("Query: " + query);
try try
{ {
Statement statement = RoleBasedAccessControl.getConnection(s).createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY ); Statement statement = WebSession.getConnection(s).createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY );
statement.executeUpdate(query); statement.executeUpdate(query);
} }
catch ( SQLException sqle ) catch ( SQLException sqle )

View File

@ -60,8 +60,8 @@ public class UpdateProfile_i extends UpdateProfile
//System.out.println("Query: " + query); //System.out.println("Query: " + query);
try try
{ {
Statement answer_statement = RoleBasedAccessControl.getConnection(s).createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY ); Statement answer_statement = WebSession.getConnection(s).createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY );
ResultSet answer_results = answer_statement.executeQuery( query ); answer_statement.execute( query );
} }
catch ( SQLException sqle ) catch ( SQLException sqle )
{ {
@ -114,7 +114,7 @@ public class UpdateProfile_i extends UpdateProfile
try try
{ {
Statement statement = RoleBasedAccessControl.getConnection(s).createStatement(); Statement statement = WebSession.getConnection(s).createStatement();
statement.executeUpdate(query); statement.executeUpdate(query);
} }
catch ( SQLException sqle ) catch ( SQLException sqle )

View File

@ -5,7 +5,6 @@ import java.sql.SQLException;
import java.sql.Statement; import java.sql.Statement;
import org.owasp.webgoat.lessons.AbstractLesson; import org.owasp.webgoat.lessons.AbstractLesson;
import org.owasp.webgoat.lessons.RoleBasedAccessControl.RoleBasedAccessControl;
import org.owasp.webgoat.lessons.RoleBasedAccessControl.ViewProfile; import org.owasp.webgoat.lessons.RoleBasedAccessControl.ViewProfile;
import org.owasp.webgoat.session.Employee; import org.owasp.webgoat.session.Employee;
import org.owasp.webgoat.session.UnauthorizedException; import org.owasp.webgoat.session.UnauthorizedException;
@ -82,7 +81,7 @@ public class ViewProfile_i extends ViewProfile
try try
{ {
Statement answer_statement = RoleBasedAccessControl.getConnection(s).createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY ); Statement answer_statement = WebSession.getConnection(s).createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY );
ResultSet answer_results = answer_statement.executeQuery( query ); ResultSet answer_results = answer_statement.executeQuery( query );
if (answer_results.next()) if (answer_results.next())
{ {