Req #71576 [NEW]: FILTER_VALIDATE_URL uses an obsolete URI RFC
| From: | apokryfos84 at gmail dot com | Date: | Fri, 12 Feb 2016 15:33:05 +0000 |
| Subject: | Req #71576 [NEW]: FILTER_VALIDATE_URL uses an obsolete URI RFC | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-199177@lists.php.net to get a copy of this message | ||
From: apokryfos84 at gmail dot com
Operating system: Linux
PHP version: 5.6.18
Package: Filter related
Bug Type: Feature/Change Request
Bug description:FILTER_VALIDATE_URL uses an obsolete URI RFC
Description:
------------
According to http://php.net/manual/en/filter.filters.validate.php
"Validates value as URL (according to »
http://www.faqs.org/rfcs/rfc2396)"
However RFC 2396 has been made obsolete by RFC 3986. This results in
several valid RFC 3986 URIs to not validate correctly, (e.g. protocol
agnostic URLs).
Test script:
---------------
echo
filter_var("https://example.com/path/to/resource?query=param",FILTER_VALIDATE_URL)?"yes":"no";
// Echoes yes
echo
filter_var("//example.com/path/to/resource?query=param",FILTER_VALIDATE_URL)?"yes":"no";
// Echoes no but should echo yes as per section 4.2 of RFC 3986
--
Edit bug report at https://bugs.php.net/bug.php?id=71576&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71576&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71576&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71576&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=71576&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=71576&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=71576&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=71576&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=71576&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=71576&r=support
Expected behavior: https://bugs.php.net/fix.php?id=71576&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=71576&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=71576&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=71576&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71576&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=71576&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=71576&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=71576&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71576&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=71576&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=71576&r=mysqlcfg