Do not propagate empty passwords from the hidden form field.

fixes #32886

git-svn-id: https://develop.svn.wordpress.org/trunk@33384 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2015-07-23 04:59:04 +00:00
parent 63dc5e491f
commit b77d19aa8b

View File

@ -109,8 +109,10 @@
* pass2 field to the pass1 field.
*/
pw_field2.on( 'input propertychange', function() {
pw_field.val( pw_field2.val() );
pw_field.trigger( 'propertychange' );
if ( pw_field2.val().length > 0 ) {
pw_field.val( pw_field2.val() );
pw_field.trigger( 'propertychange' );
}
} );
pw_new.on( 'click', 'button.wp-generate-pw', function(){