From: ch Operating system: any PHP version: 5.4.0alpha3 Package: Filter related Bug Type: Bug Bug description:FILTER_VALIDATE_EMAIL fails with valid addresses containing "--" twice
Description: ------------ The FILTER_VALIDATE_EMAIL check fails with valid adresses that contain "--" twice because they have e.g. a German Umlaut ("ä") after a dash ("-"). The following examples can be verified using the converter tool on the DeNIC page at http://www.denic.de/domains/internationalized-domain-names/idn-konvertierung.html IDN: example-ä.de ACE-String: xn--example--7za.de Test script: --------------- --TEST-- Bug #XXXXX (FILTER_VALIDATE_EMAIL fails with valid addresses containing "--" twice) --FILE-- <?php $email_address = "t...@xn--example--7za.de"; // "example-ä.de" var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL)); ?> --EXPECTF-- %unicode|string%(21) "t...@xn--example--7za.de" Expected result: ---------------- "t...@xn--example--7za.de" Actual result: -------------- bool(false) $ TEST_PHP_EXECUTABLE=/home/chammers/workspace/php-src-5.4/sX.phpt /php ./run-tests.php ext/filter/tests/bugXXXXX ===================================================================== PHP : /home/chammers/workspace/php-src-5.4/sapi/cli/php PHP_SAPI : cli PHP_VERSION : 5.4.0beta1-dev ZEND_VERSION: 2.4.0 PHP_OS : Linux - Linux sys-251 2.6.38-bpo.2-686 #1 SMP Tue Jun 14 11:43:18 UTC 2011 i686 INI actual : /home/chammers/workspace/php5/php5-5.3.3 More .INIs : CWD : /home/chammers/workspace/php5/php5-5.3.3 Extra dirs : VALGRIND : Not used ===================================================================== Running selected tests. FAIL Bug #XXXXX (FILTER_VALIDATE_EMAIL fails with valid addresses containing "--" twice) [ext/filter/tests/bugXXXXX.phpt] -- Edit bug report at https://bugs.php.net/bug.php?id=55478&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=55478&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=55478&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=55478&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=55478&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55478&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=55478&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=55478&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=55478&r=needscript Try newer version: https://bugs.php.net/fix.php?id=55478&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=55478&r=support Expected behavior: https://bugs.php.net/fix.php?id=55478&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=55478&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=55478&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=55478&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=55478&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=55478&r=dst IIS Stability: https://bugs.php.net/fix.php?id=55478&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=55478&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=55478&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=55478&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=55478&r=mysqlcfg