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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kelunik@php.net
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 12:01:29 2024 UTC