Paper which compares users' understanding of different terms used for special characters, such as "symbol", "non-alphanumeric", "punctuation", and "special characters":
http://journals.sagepub.com/doi/pdf/10.1177/1541931213601174
It's paywalled but I'll summarize relevant findings:
- Users think of fewer characters as being "symbols" than "special characters". Therefore, "special characters" is a better term to use to convey the set of characters.
- No term conveys the set of characters very well. It's recommended to explicitly list allowable characters.
Therefore I propose these changes:
1. Use term "special character" instead of "symbol".
2. List the allowed characters explicitly. (This may already be done, not sure.)
Also, I think we should consider allowing whitespace because some small percentage of users considers "special characters" to encompass whitespace characters. Drupal trims it from the beginning and end of passwords.
Comments
Comment #2
shrop commentedI agree wtih calling them "special characters" and displaying the allowed characters.
More related reference materials on the subject:
Comment #3
aohrvetpv commentedThanks for seconding the switch to "special characters" and for the resources. I'll try to write a patch for 7.x-2.x and check our list of special characters versus the OWASP one.
Do you think it would be a good or bad idea to change it in 7.x-1.x? 7.x-1.x uses "punctuation" which is the worst term of all per the paper. (They found people tend to have a very limited idea of what counts as "punctuation".) The code uses
ctype_punct()for the check, which returns TRUE for non-alphanumeric non-whitespace printable ASCII characters. I think I remember though it is discouraged to change strings in a stable module because it breaks translations? I think it may be worth the change anyway.Comment #4
aohrvetpv commentedComment #5
aohrvetpv commentedMaybe the code should use "special_char_count" instead of "special_count". At the time "special_count" seemed consistent with "alpha_count" and "int_count", and perhaps avoids confusion with "char_count". Maybe it doesn't matter.
Comment #6
shrop commentedI don't think it would hurt to propose a patch for the change for consistency in 7.x-1.x. If it gets released, will want to make a special note in the release.
Comment #7
aohrvetpv commentedPatch for 7.x-1.x.
I was hoping to make a new 7.x-1.x release this week, like today: #2869115: Release 7.x-1.13. There have been a lot of bug fixes + Features integration since the last release. Not sure whether it's worth blocking on this issue.
Comment #9
aohrvetpv commentedNow with bytes
Comment #10
aohrvetpv commentedComment #11
aohrvetpv commented8.x-3.x is also using "punctuation". I can provide more info on the paper's findings re "special characters" vs. "punctuation" if desired.
Comment #13
aohrvetpv commentedComment #14
aohrvetpv commentedRe-uploading because I can't get the testbot to stop trying to test on D7.
Comment #15
aohrvetpv commentedRe "punctuation":
The study reported in the NIST paper had 60 age/education-varied participants from the Washington DC area. The paper says they tended to view "punctuation" as a character type distinct from "special characters". The characters .,!;:?'" were each considered as "punctuation" by >80% of participants, but all other characters were considered as punctuation by <40% of participants. By contrast, the characters #$^@%&*~({}`)-+/<>!-=[}|\ were considered "special characters" by >80% of participants and "",;:.' were considered "special characters" by >70% of participants--a much larger set than with punctuation.
The paper doesn't make a recommendation of which term to use. "Special characters" seems much better than "punctuation" to me based on the study results above. The paper's explicit recommendations include giving a full list of characters allowed rather than partial lists. They also recommend against the jargon term "non-alphanumeric".
Comment #17
aohrvetpv commentedWent ahead and committed on 7.x-2.x. Will consider committing on 7.x-1.x in the future.
Comment #19
aohrvetpv commentedMissed a file in commit c7b511a.
Comment #20
daggerhart commentedMakes perfect sense to me, and you have a study to back it up!
Patch applies cleanly. Change shows up in the UI. I search the code for more instances of "punctuation", this patch gets all of them.
Comment #22
nerdsteinI've done a code review and tested, this looks good on my end. Merging and marking issue as fixed after pushing up.
Comment #23
nerdsteinMarking as fixed