Closed (works as designed)
Project:
Drupal core
Version:
8.2.x-dev
Component:
user system
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
25 Sep 2011 at 22:39 UTC
Updated:
21 Apr 2016 at 13:46 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dave reidConsidering the username is the "login name" are you looking more for a "real name" type of display? If so, you should look at using http://drupal.org/project/realname.
Comment #1.0
droplet commentedUpdated issue summary.
Comment #2
wiifmAssigning myself to look at this, able to replicate this on the latest 8.0.x
Comment #3
wiifmSo it turns out this is a rather complex beast, I was using http://unicode-table.com/ for reference, and there is a large amount of unicode characters out there.
I have excluded U+00A1 through U+00BF which covers most English symbols and math characters. All of which I would argue make no sense being in a username. Amended title of the issue to reflect this.
Added tests, and amended an existing one.
Tests pass with
sudo -u www-data php core/scripts/run-tests.sh --verbose --url http://d8.localhost/ --file core/modules/user/src/Tests/UserValidationTest.phpComment #4
quietone commentedWorks fine for excluding characters on a typical keyboard. But I could still add other math symbols, such as 27C0— 27EF as well as other characters/symbols that seem wrong in a name.
Would it be easier to test for allowed, presumably Latin, characters?
Comment #5
jazio commentedI added more checks on more math symbols and ideographic descriptions.
Comment #6
joelpittetThis looks good though due to it being marked as a Feature request I'll bump it to 8.1.x. We can move it back to a patch release if it's a bug.
Comment #7
swentel commentedThis would mean I can't use my email address anymore as my username, which I often do ..
This really doesn't seem like a bug, nor feature to me, just by design.
Comment #9
alexpottDisallowing characters which are currently allowed can't really happen. What do we do for existing sites? An upgrade path is going to be impossible. And even if we filed this for D9 what is the migration path?