mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 21:28:55 +00:00
Making sure password strength is between 0 and 100
bug# 94179. r=ddrinan, sr=hewitt
This commit is contained in:
parent
58ce656cd9
commit
6f90d295cf
@ -185,6 +185,15 @@ function setPasswordStrength()
|
||||
|
||||
var pwstrength=((pwlength*10)-20) + (numeric*10) + (numsymbols*15) + (upper*10);
|
||||
|
||||
// make sure we're give a value between 0 and 100
|
||||
if ( pwstrength < 0 ) {
|
||||
pwstrength = 0;
|
||||
}
|
||||
|
||||
if ( pwstrength > 100 ) {
|
||||
pwstrength = 100;
|
||||
}
|
||||
|
||||
var mymeter=document.getElementById('pwmeter');
|
||||
mymeter.setAttribute("value",pwstrength);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user