php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #51616 FILTER_VALIDATE_URL undocumented.
Submitted: 2010-04-20 18:49 UTC Modified: 2010-08-09 23:46 UTC
From: bugs dot php at luden dot se Assigned: preinheimer (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant 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: bugs dot php at luden dot se
New email:
PHP Version: OS:

 

 [2010-04-20 18:49 UTC] bugs dot php at luden dot se
Description:
------------
Manual page:

<http://www.php.net/manual/en/filter.filters.validate.php>

The description for FILTER_VALIDATE_URL says "Validates value
as URL, optionally with required components.".

It is not documented which specification (such as RFC 3986) it
validates against. Without any way to determine what the filter
is supposed to do, it is entirely useless for anything but toy
programs.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-06-29 11:19 UTC] pierrotevrard at gmail dot com
I notice that some flags like FILTER_FLAG_ALLOW_FRACTION or FILTER_FLAG_PATH_REQUIRED are missing on this page...

Perhaps, it should be a good idea to say that there is more flags in the predefined constants.
 [2010-07-28 03:03 UTC] preinheimer@php.net
This is an interesting question, I'll see who I can bug.
 [2010-08-08 23:59 UTC] preinheimer@php.net
We follow: http://www.ietf.org/rfc/rfc2396.txt

Any differences between that spec and observed results should be filed as bugs 
against the feature. 

I'll update the doc page once I remember how.
 [2010-08-09 14:29 UTC] bugs dot php at luden dot se
If the filter validates against the (obsolete) RFC 2396,
then "Trigger-happy" Jani was wrong to mark bug #51050 as
bogus, because there are no productions in the syntax that
allows the characters <>"\ .

Also, RFC 2396 only mention URLs in passing. Is the filter
supposed to validate against a <URI-reference>?
 [2010-08-09 23:46 UTC] preinheimer@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: preinheimer
 [2010-08-09 23:46 UTC] preinheimer@php.net
- I've included a link to the RFC in the documentation, it should go out with the 
next build.
 - The filter will only validate ASCII based content, the new internationalized 
domains will fail, a note to that affect has also been added.

I received the RFC information from Ilia (thanks!)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 16 03:01:28 2024 UTC