php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49652 FILTER_VALIDATE_EMAIL alllows double -
Submitted: 2009-09-24 10:27 UTC Modified: 2009-09-24 19:50 UTC
From: riad93 at mail dot ru Assigned:
Status: Not a bug Package: Filter related
PHP Version: 5.2.11 OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: riad93 at mail dot ru
New email:
PHP Version: OS:

 

 [2009-09-24 10:27 UTC] riad93 at mail dot ru
Description:
------------
As I know double - are not allowed in domen names and usernames of email

Reproduce code:
---------------
var_dump(filter_var('a--b@m--l.ru',FILTER_VALIDATE_EMAIL));

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

Actual result:
--------------
string(12) "a--b@m--l.ru"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-24 19:50 UTC] sjoerd@php.net
Thank you for your feedback.

I could not find any specification that disallows consecutive hyphens, and I did find an actual domain name with consecutive hyphens:
http://www.xn--sgarr-wqa3i.com/

I guess it is allowed, so this is not a bug.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 06:01:35 2024 UTC