@cemdev opened this Issue on July 21st 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 commented on July 22nd 2014 Owner

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 commented on July 22nd 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 commented on July 22nd 2014 Owner

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 commented on July 22nd 2014 Member

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

This Issue was closed on July 23rd 2014
Powered by GitHub Issue Mirror