Closed GoogleCodeExporter closed 8 years ago
You're right that our current regex doesn't support these cases. In 4.6+ we've
moved to using PHP's built-in filter_var() function to validate email
addresses. While I could bring that forward to 4.5, it won't help much because
the PHP team have labelled it a Won't-Fix issue:
https://bugs.php.net/bug.php?id=49576.
Their argument about 127.0.0.1 having to be in square brackets to meet the spec
is true. And, in fact if we switch to using filter_var(), that one will be
permitted. However, @localhost and other non-tld-style email addresses will all
fail. The suggestion on the PHP bug thread is to test separately for such
special cases and allow them through, but that's pretty difficult given that
you could use @localhost, @box, @server, @squid, ... as server aliases.
Bottom line is that aliases such as localhost will probably not be supported.
But I can permit @[127.0.0.1] by employing PHP's filter instead of our own,
which is at least a compromise.
Original comment by stefdawson
on 11 Sep 2014 at 11:12
This issue was closed by revision r5892.
Original comment by stefdawson
on 11 Sep 2014 at 11:14
Original issue reported on code.google.com by
p...@pragmatika.net
on 11 Jul 2014 at 4:23