Bug #76919 [Ver->Dup]: REMOTE_ADDR in square brackets

From: Date: Tue, 12 Mar 2019 08:59:48 +0000
Subject: Bug #76919 [Ver->Dup]: REMOTE_ADDR in square brackets
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-219921@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76919&edit=1 ID: 76919 Updated by: nikic@php.net Reported by: a dot schilder at gmx dot de Summary: REMOTE_ADDR in square brackets -Status: Verified +Status: Duplicate Type: Bug Package: Built-in web server Operating System: Windows 10 PHP Version: 7.3.0RC1 Block user comment: N Private report: N New Comment: Same issue as bug #77722, which is now fixed. Previous Comments: ------------------------------------------------------------------------ [2018-09-23 10:01:10] cmb@php.net That seems to be an unintended side effect of fixing bug #76136. ------------------------------------------------------------------------ [2018-09-23 08:47:35] a dot schilder at gmx dot de Description: ------------ 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: --------------- echo $_SERVER['REMOTE_ADDR'] Expected result: ---------------- ::1 Actual result: -------------- [::1] ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76919&edit=1

« previous php.bugs (#219921) next »