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

Piwik::checkValidLoginString(): allow "@" in login #1762

Closed
anonymous-matomo-user opened this issue Oct 12, 2010 · 8 comments
Closed

Piwik::checkValidLoginString(): allow "@" in login #1762

anonymous-matomo-user opened this issue Oct 12, 2010 · 8 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@anonymous-matomo-user
Copy link

Currently, piwik explicitely forbid use of "@" in a user login. (only [a-zA-Z0-9-._] are allowed )

It doesn't make much sense to forbid the "@" and it make it impossible to integrate piwik with any service where the login is the email (such as lot of LDAP setup).

@anonymous-matomo-user
Copy link
Author

Fixing this bug is really easy :

core/Piwik.php, line 1595

replace:

&& (preg_match('/^[A-Za-z0-9_.-]*$/', $userLogin) > 0))

By

&& (preg_match('/^[@A-Za-z0-9_.-]*$/', $userLogin) > 0))

@anonymous-matomo-user
Copy link
Author

(I've tested it and it works great)

@robocoder
Copy link
Contributor

re: LDAP. Is this change necessary, given the LDAP plugin in #734?

@anonymous-matomo-user
Copy link
Author

I guess it is because it looks like the http_auth plugin is more interesting anyway. Ldap is only use to do authentification, piwik still do the authorization.

Comments in the bug related to the http_auth plugin seems to think the same;-)

@mattab
Copy link
Member

mattab commented Nov 16, 2010

increasing priority, as it makes sense to allow @ in logins

@mattab
Copy link
Member

mattab commented Nov 29, 2010

(In [3381]) Fixes #1762

@robocoder
Copy link
Contributor

(In [3388]) refs #1762 - fix unit test

@robocoder
Copy link
Contributor

(In [3646]) fixes #1970, refs #1762 - add more unit tests

This issue was closed.
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

3 participants