Closed (fixed)
Project:
Password Policy
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
27 Feb 2017 at 23:35 UTC
Updated:
19 Dec 2017 at 18:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
acbramley commentedHere's a first cut.
Comment #4
acbramley commentedWoops, removed the test as the option no longer exists.
Comment #5
fenstratNeeds 'consecutive' otherwise it's ambiguous. I.e. '@max consecutive identical characters'.
Comment #6
acbramley commentedGood spotting, fixed.
Comment #7
fenstratThis looks good.
Comment #8
nerdsteinHas this been functionally tested yet? I don't often move issues to RTBC until it's been done
Code review comments:
1.
class Consecutive- Can this be ConsecutiveCharacters? This would mimic the convention used on other constraints.Comment #9
nerdsteinAnd, really awesome job with the automated tests. I would love to see you submit a patch that refactors the tests of the other constraints :)
Comment #10
acbramley commented@nerdstein I've tested it via the Drupal UI, yes. And thanks! I was thinking of doing just that once this gets in :)
Patch incoming refactoring the class name.
Comment #11
acbramley commentedNo interdiff here as I renamed the tests too for consistency, there was also somehow a duplicate functional test file which I've now removed.
Comment #12
fenstrat@nerdstein Sorry I didn't make it clear, but yes I tested this through the UI as well as reviewing the code.
@acbramley has made the changes requested in #8 so moving back to RTBC.
Comment #13
aohrvetpv commentedShouldn't "character types" instead be "consecutive identical characters"?
Also, I am wondering if it should be mentioned somewhere this is case insensitive. I personally was not sure whether "s" and "S" would be considered "identical". Is the case insensitivity non-obvious to anyone else or just me?
Comment #14
acbramley commentedFixed #13.
Comment #15
fenstratFix for #13 looks good.
@AohRveTPV this is case sensitive, so "ss" will trigger a password fail (if max_consecutive_characters == 2) while "sS" will not.
I'd say adding a ", case sensitive." note onto the message "Password must have fewer than 2 consecutive identical characters." should help clear that up. Marking as Needs work for that.
Comment #16
acbramley commentedFixes #15
Comment #17
fenstratGreat, thanks!
Comment #18
aohrvetpv commentedI ran Coder on the patched code and it gave a warning:
I'll plan to make the fix later, but an updated patch is welcome. Haven't yet reviewed/tested the patch.
Comment #19
acbramley commentedComment #20
fenstratWell spotted @AohRveTPV, thanks @acbramley.
Comment #22
nerdsteinThis looks good, thank you.
Comment #24
aohrvetpv commentedI implemented this constraint for 7.x-1.x. A website I work on needed it. Do not plan to add it to 7.x-1.x, just wanted to share it here.
Comment #25
aohrvetpv commentedInadvertently uploaded a case-insensitive version of this constraint in #24.
Here is a 7.x-1.x implementation of the constraint that should behave the same as the 7.x-2.x and 8.x-3.x implementations.