|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76212 Filter var URL with underscore in hostname
Submitted: 2018-04-12 08:29 UTC Modified: 2018-04-12 09:15 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: dimitri at sponsorboost dot com Assigned:
Status: Not a bug Package: Filter related
PHP Version: 7.0.29 OS: Windows (XAMPP)
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.
Bug Type:
From: dimitri at sponsorboost dot com
New email:
PHP Version: OS:


 [2018-04-12 08:29 UTC] dimitri at sponsorboost dot com
Hostname can't contain underscore '_'.

I find RFC norme : this

Test script:

Expected result:
string '' 
string '' 

Actual result:
string '' 
boolean false


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-04-12 08:44 UTC] sjon at hortensius dot net
I think this explains it pretty good:

> for host names (or for URLs, which include a host name), [..] this is different, the relevant standard is RFC 1123, section 2.1 "Host Names and Numbers" which limits host names to letters-digits-hyphen.
 [2018-04-12 08:48 UTC] spam2 at rhsoft dot net
just don't do that - countless developer hours are wasted in the past years because of such hostnames and then finally test in different browsers and find out after hhours that MSIE don't like cookies for hostnames which must not exist
 [2018-04-12 09:15 UTC]
-Status: Open +Status: Not a bug
 [2018-04-12 09:15 UTC]
As commented.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon May 23 00:03:41 2022 UTC