Bug #80580 [Com]: listen.allowed_clients does not operate as expected with blank or "any" value

From: Date: Sun, 03 Jan 2021 23:56:16 +0000
Subject: Bug #80580 [Com]: listen.allowed_clients does not operate as expected with blank or "any" value
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-231350@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80580&edit=1 ID: 80580 Comment by: daverandom@php.net Reported by: matthew at mamis dot com dot au Summary: listen.allowed_clients does not operate as expected with blank or "any" value Status: Verified Type: Bug Package: FPM related Operating System: RedHat 8 PHP Version: 7.4.13 Block user comment: N Private report: N New Comment: It is, however, worth noting that this may be simply a documentation issue. The phrasing "left blank" would probably be more accurately stated as "not specified" and the term "any" does not necessarily imply that the literal string "any" should mean "any value". That said, I would at least expect the empty string to function the same as unspecified in this case. Previous Comments: ------------------------------------------------------------------------ [2021-01-03 23:51:42] daverandom@php.net reproduced in 8.0.0 ------------------------------------------------------------------------ [2021-01-03 22:07:58] matthew at mamis dot com dot au Description: ------------ In PHP FPM, setting listen.allowed_clients to either of the following values will result in PHP-FPM rejecting fastcgi requests This is unexpected behaviour, as the documentation states that... (1) If this value is left blank, connections will be accepted from any ip address. (2) Default Value: any Test script: --------------- php-fpm.conf: [global] pid = /run/php/php-fpm.pid error_log = /var/log/php-fpm.log include=/etc/php-fpm/pool.d/*.conf pool.d/www.conf (example: 1): [www] user = php-fpm group = php-fpm listen = 9000 listen.allowed_clients = pool.d/www.conf (example: 2): [www] user = php-fpm group = php-fpm listen = 9000 listen.allowed_clients = any Expected result: ---------------- Setting listen.allowed_clients to a value of "" or "any" should result in the fastcgi connection being accepted Actual result: -------------- PHP-FPM rejects the request, with the following error... php-fpm_1 | ERROR: Connection disallowed: IP address '172.20.0.5' has been dropped. Additionally, the following error messages are thrown on startup... Example 1 (listen.allowed_clients = ) php-fpm_1 | ERROR: Wrong IP address '' in listen.allowed_clients php-fpm_1 | ERROR: There are no allowed addresses Example 2 (listen.allowed_clients = any) php-fpm_1 | ERROR: Wrong IP address 'any' in listen.allowed_clients php-fpm_1 | ERROR: There are no allowed addresses ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=80580&edit=1

« previous php.bugs (#231350) next »