|  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
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.
Block user comment
Status: Assign to:
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-2023 The PHP Group
All rights reserved.
Last updated: Mon Dec 11 19:01:28 2023 UTC