Bug #70298 [Ver->Csd]: filter_var strips '/' characters, counter to docs

From: Date: Sun, 30 Aug 2015 13:49:44 +0000
Subject: Bug #70298 [Ver->Csd]: filter_var strips '/' characters, counter to docs
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-195613@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70298&edit=1 ID: 70298 Updated by: cmb@php.net Reported by: rfredlund13 at gmail dot com Summary: filter_var strips '/' characters, counter to docs -Status: Verified +Status: Closed Type: Bug Package: Filter related Operating System: Irrelevant PHP Version: 5.6.12 Assigned To: cmb Block user comment: N Private report: N New Comment: Okay, no further comments so I'm closing. Previous Comments: ------------------------------------------------------------------------ [2015-08-19 13:42:21] cmb@php.net For reference: <https://3v4l.org/JcI5q>. ------------------------------------------------------------------------ [2015-08-19 13:41:27] cmb@php.net Fixing the docs is necessary anyway, so I've did that. I'm leaving the ticket open for now. ------------------------------------------------------------------------ [2015-08-19 13:40:08] cmb@php.net Automatic comment from SVN on behalf of cmb Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=337553 Log: As of PHP 5.5.11/5.3.1 FILTER_SANITIZE_EMAIL removes slashes (see #70298) ------------------------------------------------------------------------ [2015-08-19 13:18:13] rfredlund13 at gmail dot com That makes sense. The RFCs are pretty complicated, and cover a lot of edge cases. I do not need to perfectly conform to the RFCs, so I will just remove '/' from my test case. Still, the documentation should be updated to remove '/' from the list of allowed characters. ------------------------------------------------------------------------ [2015-08-19 13:08:27] cmb@php.net Indeed, slashes are allowed in quoted-strings. However, the slashes had been disallowed as resolution for bug #49470. Not sure, what to do. Actually, the implementation of FILTER_SANITIZE_EMAIL is way too simplistic to even vagely conform to one of the relevant RFCs. Something like Damian's regex-email.php algorithm seems to be more appropriate. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=70298 -- Edit this bug report at https://bugs.php.net/bug.php?id=70298&edit=1

« previous php.bugs (#195613) next »