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

From: Date: Sun, 23 Sep 2018 10:01:10 +0000
Subject: Bug #76919 [Opn->Ver]: REMOTE_ADDR in square brackets
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-217201@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: cmb@php.net Reported by: a dot schilder at gmx dot de Summary: REMOTE_ADDR in square brackets -Status: Open +Status: Verified 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: That seems to be an unintended side effect of fixing bug #76136. Previous Comments: ------------------------------------------------------------------------ [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 (#217201) next »