Closed (fixed)
Project:
Password Policy
Version:
4.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Jun 2023 at 21:13 UTC
Updated:
8 Apr 2024 at 05:29 UTC
Jump to comment: Most recent
Comments
Comment #3
justanothermark commentedAdded patch which:
\Drupal\Tests\password_policy_length\Unit\PasswordLengthTest::lengthDataProvider()strlen()withmb_strlen()in\Drupal\password_policy_length\Plugin\PasswordConstraint\PasswordLength::validate()Comment #4
justanothermark commentedComment #5
alina.basarabeanu commentedChanges tested on Drupal Version 9.5.10 and Password Policy 4.0.0.
The minimum password length is set to 5 characters and aaa$ or tes£ passwords are failing the validation.
Without the patch those passwords are valid.
Comment #6
kristen polAssigning to myself as I'm reviewing/merging ready RTBC fixes/updates over the next few days.
Comment #7
kristen polLooks like we are missing a couple of places, but I can update these:
UPDATED: Looking at the code, I don't think this is necessary as it's removing zero character items from the array.
and perhaps: $blacklisted_passwords = array_filter($blacklisted_passwords, 'strlen');
Comment #8
kristen polI'll test this.
Comment #9
kristen polActually, I think I'm wrong here. Core is using
strlen:so I'll change it back and add a comment.
Comment #10
kristen polTested both min and max and it works as expected.
Since I didn't add logic, just a comment, back to RTBC. I'll get this merged.
Comment #12
kristen polThanks everyone for the help on this issue. The fix has been merged and will be part of the next release.
Comment #14
kristen polThis is part of the new 4.0.1 release.