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

From: Date: Sun, 03 Jan 2021 22:07:58 +0000
Subject: Bug #80580 [NEW]: listen.allowed_clients does not operate as expected with blank or "any" value
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-231348@lists.php.net to get a copy of this message
From:             matthew at mamis dot com dot au
Operating system: RedHat 8
PHP version:      7.4.13
Package:          FPM related
Bug Type:         Bug
Bug description:listen.allowed_clients does not operate as expected with blank or "any"
value

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 bug report at https://bugs.php.net/bug.php?id=80580&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=80580&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=80580&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=80580&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=80580&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=80580&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=80580&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=80580&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=80580&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=80580&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=80580&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80580&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=80580&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=80580&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=80580&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=80580&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=80580&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=80580&r=mysqlcfg


Thread (3 messages)

« previous php.bugs (#231348) next »