WordPress/wp-admin/js/password-strength-meter.js
Andrew Nacin 09e92faa6c Use Dropbox's zxcvbn library for our password meter.
The library was added in [25156].

props duck_.
see #21737.

Built from https://develop.svn.wordpress.org/trunk@25157


git-svn-id: http://core.svn.wordpress.org/trunk@25136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-28 16:09:10 +00:00

7 lines
198 B
JavaScript

function passwordStrength(password1, username, password2) {
if (password1 != password2 && password2.length > 0)
return 5;
var result = zxcvbn( password1, [ username ] );
return result.score;
}