php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #68039 Better RFC conformance for FILTER_VALIDATE_URL (PR included)
Submitted: 2014-09-17 22:07 UTC Modified: 2020-03-01 23:00 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: dunglas at gmail dot com Assigned: cmb (profile)
Status: Closed Package: filter (PECL)
PHP Version: master-Git-2014-09-17 (Git) OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
44 - 32 = ?
Subscribe to this entry?

 
 [2014-09-17 22:07 UTC] dunglas at gmail dot com
Description:
------------
 According to RFC 1034, a domain name label cannot exceed 63 characters
 According to RFC 1035 the total length of an hostname cannot exceed 253 characters (optional final dot not included)
 According to RFC 952 and RFC 1123 a domain name label cannot start nor end with a non alphanumeric char (the current implementation only check the first character of the hostname)
 According to RFC 2732 an IPv6 address enclosed with square brackets is a valid hostname

The PR #826 (https://github.com/php/php-src/pull/826) make the FILTER_VALIDATE_URL filter compliant with that.

Test script:
---------------
Tests updated in the PR.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-01-30 20:46 UTC] narf at devilix dot net
Apparently, the PR/bugfix was never applied to PHP 5.x: https://3v4l.org/8PsSN
 [2020-03-01 23:00 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2020-03-01 23:00 UTC] cmb@php.net
New features are usually applied to master only, and that became
PHP-7.0.  Anyhow, this is water under the bridges now.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 12:01:31 2024 UTC