#28187 [Asn->Csd]: parse_url doesn't handle embedded IPv6 addresses
| From: | pollita@php.net | Date: | Tue, 27 Apr 2004 19:23:30 +0000 |
| Subject: | #28187 [Asn->Csd]: parse_url doesn't handle embedded IPv6 addresses | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-58885@lists.php.net to get a copy of this message | ||
ID: 28187
Updated by: pollita@php.net
Reported By: blue at anonix dot net
-Status: Assigned
+Status: Closed
Bug Type: URL related
Operating System: OpenBSD
PHP Version: 4.3.4
Assigned To: pollita
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
~/cvs/php4$ sapi/cli/php -r 'print_r(parse_url("http://[::1]/"));'
Array
(
[scheme] => http
[host] => ::1
[path] => /
)
Previous Comments:
------------------------------------------------------------------------
[2004-04-27 19:40:45] blue at anonix dot net
Description:
------------
parse_url doesn't handle embedded IPv6 addresses (RFC 2732)
Reproduce code:
---------------
print_r(parse_url('http://[::1]/'));
Expected result:
----------------
Array
(
[scheme] => http
[host] => [::1]
[path] => /
)
Actual result:
--------------
Array
(
[scheme] => http
[host] => [
[path] => /
)
With a full IPv6 address like 1234:1234:1234:1234:1324:1234:1234 it
doesn't even get that far: PHP Warning:
parse_url(http://[1234:1234:1234:1234:1324:1234:1234:1234]/): Unable to
parse url in Command line code on line 1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28187&edit=1