From b77d19aa8bb2acee9fdd9673d4584d2ea1e195e2 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Thu, 23 Jul 2015 04:59:04 +0000 Subject: [PATCH] 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 --- src/wp-admin/js/user-profile.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/js/user-profile.js b/src/wp-admin/js/user-profile.js index 94a75b04e5..771981c190 100644 --- a/src/wp-admin/js/user-profile.js +++ b/src/wp-admin/js/user-profile.js @@ -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(){