Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#34950 closed defect (bug) (fixed)

Confirm weak password checkbox not hidden when process cancelled

Reported by: chemicalsailor's profile ChemicalSailor Owned by: swissspidy's profile swissspidy
Milestone: 4.5 Priority: normal
Severity: normal Version: 4.3
Component: Users Keywords: has-patch commit
Focuses: ui, javascript, administration Cc:

Description

When changing user password, if a user enters a weak password, then cancels the process, the confirm weak password table row is not re-hidden.

Steps to recreate: Go to profile.php, generate new password, enter a weak password, cancel process

Attachments (3)

34950.patch (545 bytes) - added by subharanjan 8 years ago.
Hides and Reset the checkbox "Confirm use of weak password " on click on Cancel button
34950-Revised.patch (578 bytes) - added by subharanjan 8 years ago.
34950.2.patch (496 bytes) - added by swissspidy 8 years ago.
Simplified patch

Download all attachments as: .zip

Change History (11)

#1 @swissspidy
8 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 4.5

Can confirm. The checkbox only goes away when generating a new password or inserting a stronger one manually.

@subharanjan
8 years ago

Hides and Reset the checkbox "Confirm use of weak password " on click on Cancel button

#2 @subharanjan
8 years ago

  • Keywords has-patch added; needs-patch removed

@swissspidy
8 years ago

Simplified patch

#3 @swissspidy
8 years ago

  • Keywords commit added
  • Owner set to swissspidy
  • Status changed from new to assigned

#4 @swissspidy
8 years ago

Some additional notes on my patch:

  • The if ( $weakCheckbox.prop( 'checked' ) ) check isn't necessary. We can simply uncheck it all the time here.
  • normal is not a valid value for .hide(). Using the default value (200ms) leads to the checkbox animation taking longer than the other animation, using 0 makes it more simultaneous.

#6 follow-up: @subharanjan
8 years ago

@swissspidy Thanks for correcting the patch. I am sorry with that extra unnecessary if check. However, as per this http://www.w3schools.com/jquery/eff_hide.asp the default value seems to be 400ms. Thank you :)

Last edited 8 years ago by subharanjan (previous) (diff)

#7 in reply to: ↑ 6 @afercia
8 years ago

Replying to subharanjan:

the default value seems to be 400ms. Thank you :)

I think setting the duration to 0 it's a way to use the animation syntax (which allows to pass a "complete" callback) and still have the element immediately hidden.

#8 @swissspidy
8 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 35870:

Passwords: Hide weak password confirmation checkbox when password strength improves.

Props subharanjan for initial patch.
Fixes #34950.

Note: See TracTickets for help on using tickets.