Provide a user-accessible mechanism for skipping stages

Initially, this is only available when in debug mode
i.e. add &debug=true to the URL or set the flag in web.xml


git-svn-id: http://webgoat.googlecode.com/svn/trunk@146 4033779f-a91e-0410-96ef-6bf7bf53c507
This commit is contained in:
rogan.dawes
2007-07-10 11:54:12 +00:00
parent 51cc4fb0b4
commit 3c2e63636c
2 changed files with 20 additions and 1 deletions

View File

@ -905,7 +905,12 @@ public class WebSession
eatCookies();
hintNum = -1;
}
else if (myParser.getRawParameter( STAGE, null ) != null)
{
int stage = myParser.getIntParameter(STAGE, getCurrentLesson().getStage(this));
if (stage > 0 && stage <= getCurrentLesson().getStageCount())
getCurrentLesson().setStage(this, stage);
}
// else update global variables for the current screen
else
{