First wave is complete; some rendering issues
This commit is contained in:
@ -44,9 +44,10 @@ public abstract class Assignment extends Endpoint {
|
||||
@Autowired
|
||||
private UserTracker userTracker;
|
||||
@Autowired
|
||||
private WebSession webSession;
|
||||
private WebSession webSession;
|
||||
|
||||
//// TODO: 11/13/2016 events better fit?
|
||||
|
||||
//// TODO: 11/13/2016 events better fit?
|
||||
protected AttackResult trackProgress(AttackResult attackResult) {
|
||||
if (attackResult.assignmentSolved()) {
|
||||
userTracker.assignmentSolved(webSession.getCurrentLesson(), this);
|
||||
@ -55,5 +56,10 @@ public abstract class Assignment extends Endpoint {
|
||||
}
|
||||
return attackResult;
|
||||
}
|
||||
|
||||
protected WebSession getWebSession() {
|
||||
return webSession;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -44,8 +44,6 @@ public class DatabaseUtilities
|
||||
|
||||
private static Map<String, Connection> connections = new HashMap<String, Connection>();
|
||||
private static Map<String, Boolean> dbBuilt = new HashMap<String, Boolean>();
|
||||
@Autowired
|
||||
private static WebSession webSession;
|
||||
|
||||
/**
|
||||
* <p>getConnection.</p>
|
||||
@ -54,9 +52,9 @@ public class DatabaseUtilities
|
||||
* @return a {@link java.sql.Connection} object.
|
||||
* @throws java.sql.SQLException if any.
|
||||
*/
|
||||
public static Connection getConnection() throws SQLException
|
||||
public static Connection getConnection(WebSession s) throws SQLException
|
||||
{
|
||||
return getConnection(webSession.getUserName(), webSession.getWebgoatContext());
|
||||
return getConnection(s.getUserName(), s.getWebgoatContext());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -62,8 +62,8 @@ public class WebSession {
|
||||
* @return a {@link java.sql.Connection} object.
|
||||
* @throws java.sql.SQLException if any.
|
||||
*/
|
||||
public static synchronized Connection getConnection() throws SQLException {
|
||||
return DatabaseUtilities.getConnection();
|
||||
public static synchronized Connection getConnection(WebSession s) throws SQLException {
|
||||
return DatabaseUtilities.getConnection(s);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user