WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#21778 closed enhancement (fixed)

Make it possible for plugins to enforce extra password strength / validity rules during the reset process

Reported by: westi Owned by: westi
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.4.1
Component: Users Keywords: has-patch
Focuses: Cc:
PR Number:

Description

When you change your password or signup for a new account in a multisite install it is easy for a plugin to enforce extra rules by using one of the available filters for pre-validation of the POST data.

The Password Reset process doesn't have a a suitable hook.

Attachments (1)

21778.diff (1.0 KB) - added by westi 7 years ago.
Patch to rework the checking code and add a filter for more pluggable errors.

Download all attachments as: .zip

Change History (6)

@westi
7 years ago

Patch to rework the checking code and add a filter for more pluggable errors.

#1 follow-up: @scribu
7 years ago

Why do you use do_action_ref_array() ?

#2 in reply to: ↑ 1 @westi
7 years ago

Replying to scribu:

Why do you use do_action_ref_array() ?

Probably because it is ingrained in my coding and it is how the code I based this on works - filters in the User Profile update validation.

#3 follow-up: @scribu
7 years ago

No, I mean why do you use do_action_ref_array() instead of just do_action()? We're not in PHP4 anymore. :)

#4 in reply to: ↑ 3 @westi
7 years ago

Replying to scribu:

No, I mean why do you use do_action_ref_array() instead of just do_action()? We're not in PHP4 anymore. :)

I know, I was explaining why I made the mistake ;)

#5 @westi
7 years ago

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

In [21923]:

Passwords: Make it possible for plugins to enforce extra password strength / validity rules during the reset process.

Adds a filter in the password reset process so that a plugin can enforce particular password rules on users to compliment the existing filtering in the Profile modification process.
Fixes #21778.

Note: See TracTickets for help on using tickets.