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

Email address hel*lo@mail.com should be accepted as valid #7298

Closed
AlexGanzer opened this issue Feb 25, 2015 · 3 comments
Closed

Email address hel*lo@mail.com should be accepted as valid #7298

AlexGanzer opened this issue Feb 25, 2015 · 3 comments
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. Needs Review PRs that need a code review
Milestone

Comments

@AlexGanzer
Copy link

Hello.
I'm trying to register a user with email "hel*lo@mail.com" using the Piwik's API. The API responses with following error:

 'result' => 'error'
 'message' => 'The email doesn't have a valid format.'

According to specs (http://tools.ietf.org/html/rfc5322#section-3.4 , http://tools.ietf.org/html/rfc2822#section-3.2.4) email address "hel*lo@mail.com" is valid.

Can you change email validator according specs?

@AlexGanzer AlexGanzer changed the title Email validation Wrong email validation Feb 25, 2015
@mattab mattab changed the title Wrong email validation Email address hel*lo@mail.com should be accepted as valid Feb 25, 2015
@mattab mattab added the Bug For errors / faults / flaws / inconsistencies etc. label Feb 25, 2015
@mattab mattab added this to the Short term milestone Feb 25, 2015
@mattab
Copy link
Member

mattab commented Feb 25, 2015

Hi @AlexGanzer thanks for the report!

@ArnY
Copy link
Contributor

ArnY commented Mar 4, 2015

There is really no point trying to validate an email address beside just checking the presence of the @ character and at least one dot after.

[^@]+@[^\.]+\..+

should be enough

@AlexGanzer
Copy link
Author

You can use Zend_Validate_EmailAddress. It is written by specs. Zend_Validate_EmailAddress class already exists in Piwik code.

@barbushin barbushin self-assigned this Jun 25, 2015
@barbushin barbushin added the Needs Review PRs that need a code review label Jul 1, 2015
@diosmosis diosmosis modified the milestones: 2.14.0, Short term Jul 6, 2015
diosmosis added a commit that referenced this issue Jul 6, 2015
Fixes #7298, use email address validator from Zend in Piwik::isValidEmail.
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. Needs Review PRs that need a code review
Projects
None yet
Development

No branches or pull requests

5 participants