php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76136 stream_socket_get_name should enclose IPv6 in brackets
Submitted: 2018-03-22 10:28 UTC Modified: -
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: kelunik@php.net Assigned:
Status: Closed Package: Streams related
PHP Version: 7.2.3 OS: Linux
Private report: No CVE-ID: None
 [2018-03-22 10:28 UTC] kelunik@php.net
Description:
------------
See title, the brackets are missing.

Test script:
---------------
<?php

// See https://3v4l.org/biJe1

$server = stream_socket_server("tcp://[::1]:1337/");
var_dump(stream_socket_get_name($server, false));

Expected result:
----------------
[::1]:1337

Actual result:
--------------
::1:1337

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-05-01 10:44 UTC] andrew dot nester dot dev at gmail dot com
I just added PR fixing this issue
https://github.com/php/php-src/pull/3228
 [2018-07-07 09:48 UTC] nikic@php.net
Automatic comment on behalf of alexeyseliverstov.dev@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=95013042bf85ce1f52e476c5cc301faa97f52a72
Log: Fixed bug #76136 (stream_socket_get_name enclosed IPv6 in brackets)
 [2018-07-07 09:48 UTC] nikic@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Thu Dec 13 23:01:24 2018 UTC