Closed (fixed)
Project:
Password Policy
Version:
7.x-2.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Jun 2015 at 21:49 UTC
Updated:
27 Jul 2015 at 12:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
aohrvetpv commentedComment #2
nancydruWill this do?
Comment #4
nancydruI don't really understand tests.
Comment #5
aohrvetpv commentedTestbot could not apply your patch. It looks to me like the problem is the patch file does not have a newline character at the end of the last line in the file. I'm not sure how that happens. Vim indicated this with "[noeol]". Resaving seemed to fix.
By the way, it looks like line 17 of the patch adds a trailing space.
Thanks for the patch.
Comment #6
aohrvetpv commentedFixed aforementioned newline problem and removed trailing space.
Comment #8
nancydrui don't see why that patch would fail on expiration.
Comment #9
aohrvetpv commentedRunning tests locally you can get a snapshot of the page after each request. That should be elucidating. Am running the tests locally now.
Comment #10
aohrvetpv commentedThe problem with the code in the patch: If you edit and save an existing policy, you get "Duplicate policy name."
To reproduce: Create a new policy, save, then edit, and re-save.
The test failed because it just happens to edit an existing policy as part of the test, which causes the "Duplicate policy name."
Comment #11
nancydruOkay, back to the drawing board...
Comment #12
nancydruTry it again.
Comment #14
nancydruaarrgghh
Comment #16
nancydruI give up.
Comment #17
aohrvetpv commentedSame problem as in #2: no newline character at end of last line in patch file. Are you producing your patches using Git? The following should work:
git diff >foo.patchComment #18
nancydruYes, that's what I'm doing, but there are other patches applied, so they are all stuck together and I have to try to pull them apart.
Comment #19
nancydruI pulled a fresh version.
Comment #20
aohrvetpv commentedAre you familiar with
git add -p? That is what I use most often for picking out some changes from many for a patch. You add selectively to the index from the working tree, thengit diff --staged >foo.patchto diff the index versus HEAD. Maybe you already know about it, but I had been using Git for a while before I started using it.Comment #21
nancydruNope, never ran into that one.
Comment #22
aohrvetpv commentedLooks good to me. Two minor changes:
1. Remove hyphen from "case-sensitive". (I think the grammar rule is compound modifiers following the noun they modify do not get a hyphen.)
2. Change
$dup_nameto$dupe_nameto avoid abbreviation. ("dupe" is informal adjective meaning the same as duplicate per at least one dictionary.)It might be more conventional to solve this by having a human-readable name and a machine name--not sure. But this patch seems to fix the bug and that is most important.
The
return TRUE;line in the validate function is pointless, I think, but it can be removed separately.Comment #24
aohrvetpv commentedWent ahead and committed. Thanks for the fix!
The changes in #22 are not functional changes and can be fixed later if I have erred.
Comment #25
nancydruThanks. Sorry I didn't get to it over the weekend.