php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40573 Wrong email address passes validation
Submitted: 2007-02-21 07:26 UTC Modified: 2007-02-21 08:11 UTC
From: crocodile2u at yandex dot ru Assigned:
Status: Not a bug Package: Filter related
PHP Version: 5.2.1 OS: Ubuntu Linux
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: crocodile2u at yandex dot ru
New email:
PHP Version: OS:

 

 [2007-02-21 07:26 UTC] crocodile2u at yandex dot ru
Description:
------------
Some email addresses that are obviously wrong, pass the validation with FILTER_VALIDATE_EMAIL

Reproduce code:
---------------
var_dump(filter_var("/@wrong.email", FILTER_VALIDATE_EMAIL));

Expected result:
----------------
bool(false)

Actual result:
--------------
string(13) "/@wrong.email"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-02-21 08:10 UTC] crocodile2u at yandex dot ru
I've just looked at what the RFC 2822 allows - and found that the filter actually works fine. That was my mistake to think that slashes are not allowed in the local part of address. Sorry.
 [2007-02-21 08:11 UTC] tony2001@php.net
Bogusified by user request.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 09:01:27 2024 UTC