mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-31 11:37:30 +09:00
Strengthen the use of the Master Password.
- Use 30k iterations instead of 1. - Enforce minimum password length of 8 characters. - Adjust strength meter accordingly. This resolves #82.
This commit is contained in:
parent
a54d528a92
commit
522a346ef8
4 changed files with 16 additions and 9 deletions
|
|
@ -167,8 +167,8 @@ function setPasswordStrength()
|
|||
|
||||
// length of the password
|
||||
var pwlength=(pw.length);
|
||||
if (pwlength>5)
|
||||
pwlength=5;
|
||||
if (pwlength>10)
|
||||
pwlength=10;
|
||||
|
||||
|
||||
// use of numbers in the password
|
||||
|
|
@ -190,7 +190,7 @@ function setPasswordStrength()
|
|||
upper=3;
|
||||
|
||||
|
||||
var pwstrength=((pwlength*10)-20) + (numeric*10) + (numsymbols*15) + (upper*10);
|
||||
var pwstrength=((pwlength*5)-20) + (numeric*10) + (numsymbols*15) + (upper*10);
|
||||
|
||||
// make sure we're give a value between 0 and 100
|
||||
if ( pwstrength < 0 ) {
|
||||
|
|
@ -227,6 +227,12 @@ function checkPasswords()
|
|||
}
|
||||
}
|
||||
|
||||
// Never accept short passwords < 8 chars
|
||||
if (pw1.length < 8) {
|
||||
ok.setAttribute("disabled", "true");
|
||||
return;
|
||||
}
|
||||
|
||||
if (pw1 == pw2) {
|
||||
ok.setAttribute("disabled", "false");
|
||||
} else
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
<rows>
|
||||
<row>
|
||||
<label control="oldpw">&setPassword.oldPassword.label;</label>
|
||||
<textbox id="oldpw" type="password"/>
|
||||
<textbox id="oldpw" type="password" size="18"/>
|
||||
<!-- This textbox is inserted as a workaround to the fact that making the 'type'
|
||||
& 'disabled' property of the 'oldpw' textbox toggle between ['password' &
|
||||
'false'] and ['text' & 'true'] - as would be necessary if the menu has more
|
||||
|
|
@ -46,12 +46,13 @@
|
|||
</row>
|
||||
<row>
|
||||
<label control="pw1">&setPassword.newPassword.label;</label>
|
||||
<textbox id="pw1" type="password"
|
||||
<textbox id="pw1" type="password" size="18"
|
||||
oninput="setPasswordStrength(); checkPasswords();"/>
|
||||
</row>
|
||||
<row>
|
||||
<label control="pw2">&setPassword.reenterPassword.label;</label>
|
||||
<textbox id="pw2" type="password" oninput="checkPasswords();"/>
|
||||
<textbox id="pw2" type="password" size="18"
|
||||
oninput="checkPasswords();"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue