Skip to content

Commit a8500cd

Browse files
committed
Fixed problems with answers and updated the lesson plan page
1 parent 0da280c commit a8500cd

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/main/java/org/owasp/webgoat/lessons/PasswordStrength.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ public Password(String password, String timeUnit, String answer, String explaina
8484
}
8585

8686
private boolean checkSolution(WebSession s) throws ParameterNotFoundException {
87-
boolean allCorrect = false;
88-
for ( int i = 0; i < passwords.size(); i++ ) {
87+
boolean allCorrect = true;
88+
for ( int i = 1; i <= passwords.size(); i++ ) {
8989
String key = "pass" + i;
90-
allCorrect = allCorrect && s.getParser().getStringParameter(key, "").equals(passwords.get(key));
90+
allCorrect = allCorrect && s.getParser().getStringParameter(key, "").equals(passwords.get(key).answer);
9191
}
9292
return allCorrect;
9393
}
@@ -108,6 +108,7 @@ protected Element createContent(WebSession s)
108108
if (checkSolution(s))
109109
{
110110
makeSuccess(s);
111+
ec.addElement(new BR());
111112
ec.addElement(new StringElement("As a guideline not bound to a single solution."));
112113
ec.addElement(new BR());
113114
ec.addElement(new StringElement("Assuming the calculations per second 4 billion: "));

src/main/webapp/lesson_plans/English/PasswordStrength.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
</div>
44
<p><b>Concept / Topic To Teach:</b> </p>
55
<!-- Start Instructions -->
6-
Accounts are only as secure as their passwords. Most users have the same weak password everywhere. If you want to protect them against brute-force-attacks your application should have good requirements for passwords. The password should contain lower case letters, capitals and numbers. The longer the password, the better.
6+
Accounts are only as secure as their passwords. Most users have the same weak password everywhere. If you want to protect them against brute-force-attacks your application should have good requirements for passwords. The password should contain lower case letters, capitals, numbers and special characters. The longer the password, the better, consider using a passphrase instead. For
7+
more information see: <a href="https://www.owasp.org/index.php/Authentication_Cheat_Sheet#Implement_Proper_Password_Strength_Controls" target="_blank">OWASP proper password strength</a>.
78
<!-- Stop Instructions -->
8-
<br>
9+
<br/><br/>
910
<p><b>General Goal(s):</b> </p>
1011
For this exercise, your job is to test several passwords on <a href="https://howsecureismypassword.net/" target="_blank">https://howsecureismypassword.net/</a>

0 commit comments

Comments
 (0)