|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76919 REMOTE_ADDR in square brackets
Submitted: 2018-09-23 08:47 UTC Modified: 2018-09-23 10:01 UTC
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: a dot schilder at gmx dot de Assigned:
Status: Verified Package: Built-in web server
PHP Version: 7.3.0RC1 OS: Windows 10
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2018-09-23 08:47 UTC] a dot schilder at gmx dot de
One of my scripts failed because the built-in web server returned the IPv6 value in $_SERVER['REMOTE_ADDR'] with square brackets.

The value was '[::1]' (PHP 7.3RC1) instead of '::1' (PHP 7.2.4), although it is no used as a host here (see RFC 3986, 3.2.2).

BTW: Also filter_var('[::1]', FILTER_VALIDATE_IP) fails (as expected).

Test script:

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-09-23 10:01 UTC]
-Status: Open +Status: Verified
 [2018-09-23 10:01 UTC]
That seems to be an unintended side effect of fixing bug #76136.
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Feb 17 18:01:25 2019 UTC