Closed (fixed)
Project:
Password Policy
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
6 Dec 2018 at 09:30 UTC
Updated:
24 Jun 2019 at 11:21 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
tatarbjComment #4
tatarbjFixing the tests.
Comment #6
tatarbjAt least let's see the patch without the 1.x brought tests work on the 2.x branch, so here is the patch without tests.
Comment #7
tatarbjAlright, code passes the current coverage, next step is to adapt the tests from the 1.x to 2.x
Comment #8
tatarbjA different approach for the test coverage taking the 7.x-2.0-alpha7 as base.
Comment #10
tatarbjNop, last release is too far from dev branch, let's do it on it.
Comment #11
tatarbjAlright, tests are correct now, adapted to 2.x and increasing its coverage.
Under #6 is the patch that has no tests, under #10 the one that should be applied on the top of 2.x-dev.
Comment #12
aohrvetpv commentedtatarbj, thanks very much, I had actually already written patches for 7.x-2.x and 8.x-3.x, just hadn't committed. Your patch seems better though because it has a test, so I'll review for commit.
There is no known DoS vulnerability in 7.x-2.x/8.x-3.x, but it would be good to safeguard against the possibility of a password length DoS. Even if none of the packaged constraints are vulnerable, people can write/deploy their own custom constraints which could be vulnerable.
Comment #13
aohrvetpv commentedThe AJAX check also needs to impose the password length limit, I think. I only have a few spare minutes now, so I'll post my patch and we can merge the two later...
Comment #14
aohrvetpv commentedComment #15
tatarbjThanks for raising this part with the AJAX check, I was not even thinking about it as just wanted to forward port the advisory to 7.x-2.x. If you agree, we could open a follow-up for bringing it even further to 8.x-3.x to separate these issues :)
Because of our patches are technically the same, yours have bigger coverage in the codebase, mine has the tests, I've taken yours then added the tests from mine (see interdiff).
Let's see how tests behave now!
Comment #16
tatarbjAlrighty, so we are good for further tests to arrive at RTBC - as I've done some on my localhost, they seem ok, but I don't want to put it to RTBC as written the patch :)
Comment #18
aohrvetpv commentedThanks a lot. It's great to have the test. I will make a new alpha release of 7.x-2.x shortly.
Comment #19
aohrvetpv commentednerdstein previously reviewed this patch in the security.drupal.org issue thread. So I think we're ready to commit (assuming tests pass). It would be good to add a test but not straightforward to port from 7.x so I think we can go ahead and commit.
Comment #20
aohrvetpv commentedGoing to hold off on new 7.x.2.x alpha release due to this bug which was just reported: #3018799: Consecutive character count validation fails when system generates the password
Comment #22
aohrvetpv commentedWe could add a test later for 8.x-3.x as a separate issue.
Comment #23
tatarbjHi @AohRveTPV,
I would have suggested to open a different issue to allow ppl reference this one as d7 level patch and the other one for d8 version of password policy, but as it's too late now, I'd like to leave here this message for further usage/evaluations:
Thanks again!
Bests,
Balazs.
Comment #24
sjerdoHi @AohRveTPV
Can you create a new alpha release containing the security fix? The reported bug you mentioned was closed.
Regards,
Sjoerd
Comment #25
aohrvetpv commentedMade new 7.x-2.x alpha release. nerdstein does releases for 8.x-3.x, so leaving it to him to make a new alpha release for that branch.
Comment #27
andras_szilagyi commentedIn the patch, why not use drupal_strlen() ?