Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usernames should allow German umlauts characters #7114

Closed
diosmosis opened this issue Jan 31, 2015 · 10 comments
Closed

usernames should allow German umlauts characters #7114

diosmosis opened this issue Jan 31, 2015 · 10 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@diosmosis
Copy link
Member

Caused by line https://github.com/piwik/piwik/blob/master/core/Piwik.php#L601. The regex prevents usernames from having special characters. I'm not sure what exactly the point of this is, why not allow all characters in a login handle?

Anyway, this is an issue for at least one user using LoginLdap: matomo-org/plugin-LoginLdap#86

@diosmosis diosmosis added the Bug For errors / faults / flaws / inconsistencies etc. label Jan 31, 2015
@tsteur
Copy link
Member

tsteur commented Jan 31, 2015

FYI: If we change it, we need to check all usages of the login for security etc. It might be used somewhere and not proper escaped as one was assuming it contains only [a-Z0-9-_]

@ThaDafinser
Copy link
Contributor

@tsteur is it possible to check if it's a character or a special char?
Didnt found something until yet...i use currently \p should contain all characters but does not...

[\p{L}0-9äöüÄÖÜßé]

@tsteur
Copy link
Member

tsteur commented Feb 9, 2015

If this is just about umlauts as a temporary fix we should be able to just add äöüÄÖÜßé to the allowed characters. It will of course not solve it entirely but would maybe make things easier for some users :) I read about \p{L} but not sure which letters it actually contains and whether there are possible security issues etc.

@ThaDafinser
Copy link
Contributor

@tsteur depends on the charset...used it somewhere for LDAP regex, but also didnt contain all wanted chars :-)

Seems to be a bit complicated....

http://www.regular-expressions.info/unicode.html#script

@mattab mattab added this to the Piwik 2.11.0 milestone Feb 9, 2015
@mattab
Copy link
Member

mattab commented Feb 9, 2015

if we can fix this in core by adding umlauts to the regex then maybe we should just do this for now?

@tsteur
Copy link
Member

tsteur commented Feb 9, 2015

We should just still leave the issue open or create a follow up issue to also fix this for other letters. People will most likely have this problem again very soon

@mattab mattab modified the milestones: Short term, Piwik 2.11.0 Feb 12, 2015
@mattab mattab modified the milestones: Short term, Mid term Apr 7, 2015
@ChristianGfK
Copy link

Is there any workaround for this?
In combination with LoginLdap and a company-wide Active Directory, this is kind of bad. :|

@ThaDafinser
Copy link
Contributor

@ChristianGfK try this workaround (NOT tested)

Replace this line https://github.com/piwik/piwik/blob/master/core/Piwik.php#L592

&& (preg_match('/^[A-Za-zÄäÖöÜüß0-9_.@+-]*$/D', $userLogin) > 0))

@ChristianGfK
Copy link

Thanks @ThaDafinser, I'll have a look at doing that when I take the 2.16 plunge later. :-)

@mattab mattab modified the milestones: 2.16.1, Long term Feb 16, 2016
@mattab
Copy link
Member

mattab commented Feb 16, 2016

as we have so many German users, let's do the quick fix of allowing german characters in 2.16.x 👍

@tsteur tsteur closed this as completed Mar 6, 2016
@mattab mattab changed the title usernames cannot contain umlauts usernames should allow German umlauts characters Apr 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

5 participants