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

Unable to use new domain extensions as an email address #5867

Closed
cemdev opened this issue Jul 21, 2014 · 4 comments
Closed

Unable to use new domain extensions as an email address #5867

cemdev opened this issue Jul 21, 2014 · 4 comments
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Milestone

Comments

@cemdev
Copy link

cemdev commented Jul 21, 2014

I am unable to register a new user in piwik if they are using one of the new domain extensions.

For example, the email: example@mysite.photography

fails with error message: "The email doesn't have a valid format" through both the API and the user interface.

@tsteur tsteur added this to the 2.5.0 - Piwik 2.5.0 milestone Jul 22, 2014
@tsteur
Copy link
Member

tsteur commented Jul 22, 2014

Maybe we could leave the existing validation https://github.com/piwik/piwik/blob/master/core/Piwik.php#L658 and in case it would return false fall back to check the domain/ip using for example getmxrr or checkdnsrr? Any other ideas?

@cemdev
Copy link
Author

cemdev commented Jul 22, 2014

Our QA person did some edge case testing, and the current validation is super simple.

If the domain is 7 characters or less it works. 8 or more and it doesn't. Looks like a simple regex change is all that's needed. Either remove the 7 character limit, keeping the 2 character minimum, or increase 7 to whatever the longest top level domain length is, but that's likely to change, so I would choose to remove the upper character limit entirely.

@tsteur
Copy link
Member

tsteur commented Jul 22, 2014

I modified the regex to allow up to 15 characters in domain name but we might have to increase this soon again. Thought about this before as well but wasn't sure how accurate this method is supposed to be as it is used for validation in different places. Also not sure what the longest domain extension possibly could be. Found ".international" which was the longest so far. We could also remove the upper limit as suggested by @cemdev .

@mattab any opinion?

@halfdan
Copy link
Member

halfdan commented Jul 22, 2014

@tsteur @mattab We could easily simplify the email validation to a simple check for an @ and a ..

@tsteur tsteur closed this as completed in 41f2457 Jul 23, 2014
@tsteur tsteur self-assigned this Jul 23, 2014
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. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

3 participants