Ensure random passwords are generated with upper and lower case characters (SKINS)

Version 1.361

Bugfix
Finished

A previous fix ensured there are numbers in the random passwords. This change to the javascript.html will ensure that in addition to numbers, random passwords also have upper and lower case digits, something the difficult_password_enforcement option requires. SKINS: javascript.html: function has_lower_case(pass) { var num_count = 0; for (i=0; i<pass.length; i++) { ch=pass.charAt(i); if ('a' <= ch && ch <= 'z') { num_count++; } } return num_count; } function has_upper_case(pass) { var num_count = 0; for (i=0; i<pass.length; i++) { ch=pass.charAt(i); if ('A' <= ch && ch <= 'Z') { num_count++; } } return num_count; } and in the random_pass() function: if (!has_number(pass) || !has_lower_case(pass) || !has_upper_case(pass))

Interested to try DirectAdmin? Get a 30-day Free Trial!