mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #37257
[Bug 1615280] Re: Email validation bug (long domains)
After doing a quick survey of what other PHP projects are doing
(including our own PHPMailer library), I think for now we should
probably just use FILTER_VALIDATE_EMAIL throughout. As mentioned above,
this is an improvement, but with the following known flaws:
1. No support for one-part domains (root@localhost)
2. No support for email addresses containing unicode characters (See
https://en.wikipedia.org/wiki/International_email )
PHPMailer now includes a function to punycode the domain-part of an
email address if it contains unicode, but it's not exposed as a static
function, apparently because it's reliant on knowing the character set
of the PHPMailer instance.
None of the big PHP projects currently support email addresses with
unicode in the local part (before the "@"), although there are bugs
raised with several of them, so we'll probably need to revisit this in a
few years.
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1615280
Title:
Email validation bug (long domains)
Status in Mahara:
In Progress
Status in Mahara 15.04 series:
In Progress
Status in Mahara 15.10 series:
In Progress
Status in Mahara 16.04 series:
In Progress
Status in Mahara 16.10 series:
In Progress
Bug description:
This one has existed since 2006, but only become an issue with the
opening up of TLDs over the past few years.
(https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains)
Currently the email validation in pieform limits the TLD to between 2-4 characters (see pieform_rule_email() in htdocs/lib/pieforms/pieform/rules/email.php.)
That means people from .horse, for example, can't register. Changing the regex fixed my immediate problem, haven't tested how the other email validation points react. They use FILTER_VALIDATE_EMAIL and PHPMailer::ValidateAddress, so might be better.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1615280/+subscriptions
References