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

use PHP filter to validate E-Mails #14476

Merged
merged 4 commits into from Jul 14, 2019
Merged

use PHP filter to validate E-Mails #14476

merged 4 commits into from Jul 14, 2019

Conversation

Findus23
Copy link
Member

@Findus23 Findus23 commented May 24, 2019

fixes #14475

I think using PHP builtins instead of a 10 year old library avoids bugs and having to maintain a frequently changing list of all valid TLDs.

And the only email validation that is really correct is sending an actual email as suggested in #13533

@mattab mattab added this to the 3.11.0 milestone Jun 10, 2019
@mattab mattab added the Needs Review PRs that need a code review label Jun 10, 2019
Copy link
Member

@diosmosis diosmosis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tsteur
Copy link
Member

tsteur commented Jul 5, 2019

Looks good to merge. There are a few comments re this filter and that it maybe behave a bit more strict or so but the comments are old and I reckon it's fine 👍 https://www.php.net/manual/en/filter.filters.validate.php

Before merging though could you remove the code from here @Findus23 https://github.com/matomo-org/matomo/blob/3.10.0/config/global.php#L203-L209

and I reckon we could also remove the zend class itself? It doesn't seem to be used

@Findus23
Copy link
Member Author

@tsteur Should be done in c9b5993

I guess one day we should be removing all of those zend classes and replace them with modern libraries.

@tsteur tsteur merged commit 0d9978b into 3.x-dev Jul 14, 2019
@tsteur tsteur deleted the simpler-email-validation branch July 14, 2019 20:06
@Findus23 Findus23 restored the simpler-email-validation branch October 4, 2019 09:48
@sgiehl sgiehl deleted the simpler-email-validation branch February 10, 2020 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Installer reports invalid email address when the email is valid
4 participants