Some of the policy settings are opaque to me. Please improve them to better reflect how the module actually works.
Steps:
1. Go to /admin/config/people/password_policy/add
2. Click Case sensitivity tab
Actual result:
Tab reads Case sensitive
Checkbox reads Case Sensitive
Password will require upper and lower case letters.
Expected result:
Tab reads Mixed case
Checkbox reads Mixed Case
Password will require upper and lower case letters.
Justification: Outside of the context of this module, "case sensitive" means that if the stored password has letters, the password entered at login time must match the stored password in case, but there is no implication that the stored password actually has a mix of upper and lower case. It is better for this module not to reuse the term "case sensitive" for a completely different concept.
3. Click Drupal strength tab
Actual result:
Password will be required to have match this level or higher. 0 - 100
Expected result something like:
Password will be required to have match this level or higher. 0 - 100
Starting from a base of 100 points:
- Having only 3 out of 4 of uppercase, lowercase, digit, and symbol loses 12.5 points
- Having only 2 out of 4 of uppercase, lowercase, digit, and symbol loses 25 points
- Having only 1 out of 4 of uppercase, lowercase, digit, and symbol loses 40 points
- Every character less than 6 loses 5 points
- Username used as password without regard to case gets exactly 5 points
For example:
- Aa1! is worth 100 - 10 = 90 points
- ABCDefgh is worth 100 - 25 = 75 points
- ABcd12#$ is worth 100 points
- jsmith23 and JSmith23 are each worth 5 points for user jsmith23 but 75 or 87.5 points respectively for user rjones98
Justification: Allows administrator to set a sane value without having to look at the code, as well as possibly decide to impose other constraints such as minimum length.
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | improve_definitions-2402299-15.patch | 2.22 KB | charles belov |
| #11 | improve_definitions-2402299-11.patch | 2.32 KB | charles belov |
| #7 | password_policy-improve_definitions-2402299-7.patch | 2.16 KB | aohrvetpv |
| #3 | improve_definitions-2402299-3.patch | 2.37 KB | charles belov |
Comments
Comment #1
aohrvetpv commentedThanks for the suggested improvements--I, for one, am agreed on both "Mixed case" vs. "Case sensitive" and better explaining Drupal strength. If you provide a patch or patches, we can review/commit. Otherwise, I will try to create patches later.
Comment #2
charles belovI'll try to create a patch.
Comment #3
charles belovHere goes. I made some minor changes to the strength level description from above.
Comment #4
aohrvetpv commentedComment #6
aohrvetpv commentedThe patch format seems to be a little off what the testbot expects. No worries, I can easily manually apply it and generate a new patch.
Comment #7
aohrvetpv commentedComment #8
aohrvetpv commentedDrupal strength explanation omits 30-point penalty for <6 characters. Otherwise looks good.
Comment #9
charles belovI've updated my local code. I'll upload a patch as soon as I figure out how to convert the line returns from Windows crlf to the required lf. git does this automatically for repository commits but apparently not for patch saves. This is my first patch submission ever.
Comment #10
aohrvetpv commentedYou could install dos2unix then do:
Or:
I don't see a
git diffoption to output with Unix line endings. You could probably configure git to both check out and commit Unix line endings, instead of checking out DOS and committing Unix, but if you are on Windows you may want to check out DOS. So usingdos2unixmay be the simplest way. This Drupal.org page also mentionsdos2unix: https://www.drupal.org/node/707484Comment #11
charles belovThank you. I also got some advice on the line feed issue at StackOverflow. I've tried implementing .gitattribute. We'll see how it goes.
Comment #12
aohrvetpv commentedComment #14
aohrvetpv commentedThe problem now is the paths, I think. They should be relative to the Password Policy root.
This procedure should produce correct paths:
Anyway, any patch you provide that fixes #8 I can apply manually, even if it does not satisfy the testbot.
Comment #15
charles belovHoping the 4th time is the charm.
Comment #16
charles belovComment #18
aohrvetpv commented