Bug #79802 [NEW]: VALIDATE_EMAIL has another behaviour as SANITIZE_EMAIL

From: Date: Tue, 07 Jul 2020 07:20:01 +0000
Subject: Bug #79802 [NEW]: VALIDATE_EMAIL has another behaviour as SANITIZE_EMAIL
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-227839@lists.php.net to get a copy of this message
From: cyberline Operating system: Debian 10.4 PHP version: Irrelevant Package: Filter related Bug Type: Bug Bug description:VALIDATE_EMAIL has another behaviour as SANITIZE_EMAIL Description: ------------ In all PHP Versions except 5.3.2 the following Script will return false for FILTER_VALIDATE_EMAIL while FILTER_SANITIZE_EMAIL does NOTHING to the input email. While the Provided email is a valid return path, i excpect that VALIDATE_EMAIL will return the string provided and not false. Test script: --------------- <?php $email = '3e9.1c.4UB2NC76N436-3SP03.test-EW3LBM-M6H4BG-0-1.mobil.123456.989=test.de@smtp20.test.com'; var_dump(\filter_var($email, FILTER_VALIDATE_EMAIL)); var_dump($email === \filter_var($email, FILTER_SANITIZE_EMAIL)); Expected result: ---------------- string(89) "3e9.1c.4UB2NC76N436-3SP03.test-EW3LBM-M6H4BG-0-1.mobil.123456.989=test.de@smtp20.test.com" bool(true) Actual result: -------------- bool(false) bool(true) -- Edit bug report at https://bugs.php.net/bug.php?id=79802&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79802&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79802&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79802&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79802&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79802&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79802&r=support Expected behavior: https://bugs.php.net/fix.php?id=79802&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79802&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79802&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79802&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79802&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79802&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79802&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79802&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79802&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79802&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79802&r=mysqlcfg

« previous php.bugs (#227839) next »