fix for JWT green button and WebWolf intro green button and added jwt int tests (#808)

This commit is contained in:
René Zubcevic
2020-05-07 08:28:45 +02:00
committed by GitHub
parent f4838e1233
commit 832d6432fc
4 changed files with 74 additions and 10 deletions

View File

@ -81,14 +81,19 @@ define(['jquery',
var solvedClass = 'solved-true'
for (var i=0; i< $assignmentForms.length; i++) {
//normalize path
var action = $assignmentForms.attr('action');//.replace(/\//g,'');
if (action && isAttackSolved(action)) {
//pageClass = 'fa fa-check-square-o assignment-solved';
//pageAssignments.attacks.push({solved:true});
} else {
solvedClass = 'solved-false';
var action = $assignmentForms.attr('action');
if (action.endsWith("/WebGoat/WebWolf/mail/")) {
//fix for now. the find does not seem to work properly and gets confused with two /mail
action = "/WebGoat/WebWolf/mail/send";
}
if (action.indexOf("?")>-1) {
//used to also mark forms like JWT assignment 8 complete
action = action.substring(0,action.indexOf("?"));
}
if (action && isAttackSolved(action)) {
} else {
solvedClass = 'solved-false';
}
}
pages.push({solvedClass:solvedClass,content:'assignment',curPageClass:curPageClass,pageClass:pageClass});
}