php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74470 FILTER VALIDATE EMAIL and To be valid emails
Submitted: 2017-04-18 22:21 UTC Modified: 2017-04-18 22:57 UTC
From: cemardaakin at yandex dot com Assigned:
Status: Not a bug Package: Filter related
PHP Version: 5.6.30 OS: windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: cemardaakin at yandex dot com
New email:
PHP Version: OS:

 

 [2017-04-18 22:21 UTC] cemardaakin at yandex dot com
Description:
------------
FILTER_VALIDATE_EMAIL filter accepts blabla'@domain.com. I think its not normal

Test script:
---------------
var_dump(filter_var("bla'bla'@php.net",FILTER_VALIDATE_EMAIL));


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-18 22:25 UTC] spam2 at rhsoft dot net
you think...
https://en.wikipedia.org/wiki/Email_address#Local-part
 [2017-04-18 22:32 UTC] cemardaakin at yandex dot com
I know,blabla'@email.com type is correct for universal types but is it usefull ? 

did you mean "i can use like that email" ? :)
 [2017-04-18 22:37 UTC] spam2 at rhsoft dot net
"but is it usefull" is not the qestion when it comes to validation

enough fools out there decided that the + sign is not useful and hence not accepted in webforms while it's perfect legal and on a proper mailserver would put mails in the subfolder "test" in case of "test+xxx@xecmplaec.com"

> did you mean "i can use like that email" ? :)

yes, if not some random fool decides that he don't care about RFC's and reject it
 [2017-04-18 22:57 UTC] fmargaine@php.net
-Status: Open +Status: Not a bug
 [2017-04-18 22:57 UTC] fmargaine@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

This is expected behavior.
 [2017-04-18 23:03 UTC] cemardaakin at yandex dot com
we are talking about validate and i think validate filters should be reallistic.

If i have a software developed with php,i don't want accept like as "bla'@com" from web forms. I think a lot of webmasters don't want like  "blabla'@com" emails in their databases and need another functions for filter. If FILTER_VALIDATE_EMAIL had a flag for strong filter,it was be most useful

> fmargaine@php.net

I am sorry for this situation,I thought this was a mistake
 [2017-04-19 08:05 UTC] spam2 at rhsoft dot net
> we are talking about validate and i think validate filters should be reallistic

god damned NO they should be CORRECT - no i am not a php upstream develper but just shocked about that much ignorance which explains so many weird behavior of software

we have enough broken software and you demand another one....
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 14:01:31 2024 UTC