Problem/Motivation

The Password Policy module will not validate passwords set on Simple Password Reset page if Drupal is configured to require email validation.

Steps to reproduce

1. Install the simple_pass_reset module (https://www.drupal.org/project/simple_pass_reset)
2. Install password policy
3. Go to /admin/config/people/accounts and enable Require email verification when a visitor creates an account
4. Log out and go through the password reset process
5. Enter a password that violates the password policy

The password will be accepted because PasswordPolicyValidationManager::validationShouldRun return early.

Proposed resolution

Check the current route in PasswordPolicyValidationManager to see if we're on the password reset page before returning early.

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Comments

mediabounds created an issue. See original summary.

mediabounds’s picture

Status: Active » Needs review
StatusFileSize
new3.07 KB
gabrieldv’s picture

Assigned: Unassigned » gabrieldv

I'll be reviewing it, thanks for the patch @mediabounds

gabrieldv’s picture

Assigned: gabrieldv » Unassigned
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new52.35 KB

Tested the #2 patch and it seems to be working to me, i also runned the automated tests and didn't break anything. Moving it to RTBC.

paulocs’s picture

Status: Reviewed & tested by the community » Fixed

Thanks!

  • 684d02e committed on 8.x-3.x
    Issue #3312100 by mediabounds, gabrieldv: Improved compatibility with...
paulocs’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.