Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.8.6

Request #956 Validate::email() doesn't allow Internationalized Domain Names (IDN)
Submitted: 2004-03-06 09:40 UTC
From: swalk at prp dot physik dot tu-darmstadt dot de Assigned: davidc
Status: Closed Package: Validate
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  


 [2004-03-06 09:40 UTC] swalk at prp dot physik dot tu-darmstadt dot de
Description: ------------ Validate::email() doesn't accept domain names that contain umlauts. Reproduce code: --------------- <?php require 'Validate.php'; var_dump(Validate::email('postmaster@tüv.de')); Expected result: ---------------- bool(true) Actual result: -------------- bool(false)

Comments

 [2004-03-06 09:45 UTC] neufeind at php dot net
You're absolutely right. However, there is just no real IDNA-domaincheck / converter available in PEAR. I know we should fix this - but basically I think we should add support for IDNA-converting first. Will try to have a look at this - nowever, it's not *that* urgent, since currently afaik almost no mailclient is able to handle IDNA-domains yet :-)) Using the "xn--"-form should work without a problem.
 [2004-03-06 09:46 UTC] et
I forgot, Information about IDN can be found here: http://www.ietf.org/rfc/rfc3490.txt
 [2004-06-03 14:21 UTC] mike
Why not use [[:alnum:]] instead of [a-zA-Z0-9]?
 [2004-06-03 15:19 UTC] neufeind
We're working on a package for IDNA-support ... just hold on for a while longer :-) Then we could easily extend Validate::email() to also optinally support IDNA-domains. However, I wonder if it might be a better solution to provide functions for converting an email-adress to e.g. Punycode using the IDNA-package (there are already functions for the hostname - so this would basically be about allowing one @ in ths tring) and afterwards checking for validity the usual way. Thoughts on this welcome.
 [2004-07-11 22:52 UTC] gurugeek
Dear Maintainer, Your package validate has currently 3 open bugs. We urge you to take the necessary steps to solve the reported issues at your soonest convenience. If the bug issue hasn’t been addressed yet you are kindly asked to take the necessary steps to ensure a prompt resolution of the problem. If you already addressed the reported problem feel free to change the bug status as soon as possible. Regards David Costa PEAR Quality Assurance pear-qa@lists.php.net
 [2005-03-06 02:46 UTC] dufuz
This is not a bug it's a feature/change request, none the less we'll try to address this pretty soon.
 [2005-04-05 02:52 UTC] nphase at spoono dot com
[a-zA-Z0-9]? aren't we forgetting '-' and '.' ?
 [2005-04-05 06:17 UTC] dufuz
If you look at the current regex then you see it's a bit more complex then that. It does accept - and . in most cases, in other cases it's simply illegal.
 [2007-04-20 03:45 UTC] aharvey (Adam Harvey)
I've attached two diffs: one (Validate-bug956) containing a possible fix for this request, the other (bug956.phpt.diff) containing a diff creating a bug956.phpt file for the Validate unit tests. Having said that, I'm not sure this is the approach that you'd really want to take. It adds a dependency on Net_IDNA, and relies on bug #10783 and bug #10784 being fixed within Net_IDNA (which hasn't had a release for almost two years and its CVS is non-functional, so I'm a little worried about whether it's actually being maintained or not). Still, this does make IDN domain names work within Validate::email().
 [2007-04-20 08:54 UTC] dufuz (Helgi Þormar)
This is a pretty good patch, wouldn't make it as required dep but okey :-) This is exactly the reason why we haven't used it, they just haven't been doing any work on it, can you poke the maintainers ? I'm pretty sure that they have been releasing outside of PEAR if I remember correctly
 [2007-04-21 03:00 UTC] aharvey (Adam Harvey)
Actually, one of the reasons I posted bugs #10783 and #10784 was to prod them. :) I'll e-mail them next week if I haven't heard anything.
 [2007-04-25 18:42 UTC] dufuz (Helgi Þormar)
A very odd thing, looking at http://phlymail.de/en/downloads/idna/ which seems to be the "official" page seems to have a 0.5.1 release in april 2007 when we have 0.7.1 in PEAR from 2005 o_O Could you try emailing one of the developers and see if anyone is alive
 [2007-04-27 06:26 UTC] aharvey (Adam Harvey)
E-mail sent.
 [2007-06-09 15:23 UTC] dufuz (Helgi Þormar)
So have you gotten any replies what so ever ?
 [2008-03-22 17:50 UTC] dufuz (Helgi Þormar Þorbjörnsson)
We have a new Net_IDNA release out FYI
 [2008-03-22 18:11 UTC] davidc (David Coallier)
Good stuff. I just applied "damko" patch. Let's give a look at Net_IDNA now for fun.
 [2008-03-22 18:54 UTC] davidc (David Coallier)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. Thanks a lot to adam harvey and damko for their patches. This bug is not resolved in CVS. I have tested with a few idn names but let me know if anything comes up again. Thanks,