hide password for testing with your actual password in front of colleagues

This commit is contained in:
Rene Zubcevic 2019-03-26 16:34:02 +01:00 committed by Nanne Baars
parent 4bafc19883
commit 2b2e267594
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ public class SecurePasswordsAssignment extends AssignmentEndpoint {
DecimalFormat df = new DecimalFormat("0", DecimalFormatSymbols.getInstance(Locale.ENGLISH)); DecimalFormat df = new DecimalFormat("0", DecimalFormatSymbols.getInstance(Locale.ENGLISH));
df.setMaximumFractionDigits(340); df.setMaximumFractionDigits(340);
output.append("<b>Your Password: </b>" + password + "</br>"); output.append("<b>Your Password: *******</b></br>");
output.append("<b>Length: </b>" + password.length()+ "</br>"); output.append("<b>Length: </b>" + password.length()+ "</br>");
output.append("<b>Estimated guesses needed to crack your password: </b>" + df.format(strength.getGuesses())+ "</br>"); output.append("<b>Estimated guesses needed to crack your password: </b>" + df.format(strength.getGuesses())+ "</br>");
output.append("<div style=\"float: left;padding-right: 10px;\"><b>Score: </b>" + strength.getScore()+ "/4 </div>"); output.append("<div style=\"float: left;padding-right: 10px;\"><b>Score: </b>" + strength.getScore()+ "/4 </div>");

View File

@ -26,7 +26,7 @@
<table> <table>
<tr> <tr>
<td><label>Password</label></td> <td><label>Password</label></td>
<td><input name="password" value="" type="TEXT" placeholder="Enter a secure password"/></td> <td><input name="password" value="" type="password" placeholder="Enter a secure password"/></td>
</tr> </tr>
<tr> <tr>
<td><button type="SUBMIT">Submit</button></td> <td><button type="SUBMIT">Submit</button></td>