Allowed other criteria to solve lesson and provide some feedback for acceptable solutions
git-svn-id: http://webgoat.googlecode.com/svn/trunk/webgoat@464 4033779f-a91e-0410-96ef-6bf7bf53c507
This commit is contained in:
parent
a987ca7cdc
commit
2ae584d0b2
@ -74,6 +74,10 @@ public class DOMXSS extends SequentialLessonAdapter
|
||||
getLessonTracker(s).setStage(3);
|
||||
s.setMessage("Stage 2 completed. ");
|
||||
}
|
||||
else
|
||||
{
|
||||
s.setMessage("Only <img onerror... attacks are recognized for success criteria");
|
||||
}
|
||||
|
||||
return (ec);
|
||||
}
|
||||
@ -91,6 +95,16 @@ public class DOMXSS extends SequentialLessonAdapter
|
||||
{
|
||||
getLessonTracker(s).setStage(4);
|
||||
s.setMessage("Stage 3 completed.");
|
||||
} else if (attackString.toString().toLowerCase().indexOf("iframe") != -1
|
||||
&& attackString.toString().toLowerCase().indexOf("onload") != -1
|
||||
&& attackString.toString().toLowerCase().indexOf("alert") != -1)
|
||||
{
|
||||
getLessonTracker(s).setStage(3);
|
||||
s.setMessage("Stage 3 completed. ");
|
||||
}
|
||||
else
|
||||
{
|
||||
s.setMessage("Only <iframe javascript/onload... attacks are recognized for success criteria");
|
||||
}
|
||||
return (ec);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user