Lines 10-15
Link Here
|
10 |
// Always generate a strong password |
10 |
// Always generate a strong password |
11 |
var chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; |
11 |
var chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; |
12 |
var length = [% minPasswordLength %]; |
12 |
var length = [% minPasswordLength %]; |
|
|
13 |
if ( length < 8 ) length = 8; |
13 |
var password=''; |
14 |
var password=''; |
14 |
for ( var i = 0 ; i < length ; i++){ |
15 |
for ( var i = 0 ; i < length ; i++){ |
15 |
password += chars.charAt(Math.floor(Math.random()*chars.length)); |
16 |
password += chars.charAt(Math.floor(Math.random()*chars.length)); |
16 |
- |
|
|