1--TEST-- 2FPM: GHSA-54hq-v5wp-fqgv - exceeding max_file_uploads 3--SKIPIF-- 4<?php include "skipif.inc"; ?> 5--FILE-- 6<?php 7 8require_once "tester.inc"; 9 10$cfg = <<<EOT 11[global] 12error_log = {{FILE:LOG}} 13[unconfined] 14listen = {{ADDR}} 15pm = dynamic 16pm.max_children = 5 17pm.start_servers = 1 18pm.min_spare_servers = 1 19pm.max_spare_servers = 3 20php_admin_value[html_errors] = false 21php_admin_value[max_file_uploads] = 5 22php_admin_flag[display_errors] = On 23php_admin_flag[display_startup_errors] = On 24php_admin_flag[log_errors] = On 25EOT; 26 27$code = <<<EOT 28<?php 29var_dump(count(\$_FILES)); 30EOT; 31 32$tester = new FPM\Tester($cfg, $code); 33$tester->start(); 34$tester->expectLogStartNotices(); 35echo $tester 36 ->request(stdin: [ 37 'parts' => [ 38 'count' => 10, 39 'param' => 'filename' 40 ] 41 ]) 42 ->getBody(); 43$tester->terminate(); 44$tester->close(); 45 46?> 47--EXPECT-- 48Warning: PHP Request Startup: Maximum number of allowable file uploads has been exceeded in Unknown on line 0 49int(5) 50--CLEAN-- 51<?php 52require_once "tester.inc"; 53FPM\Tester::clean(); 54?> 55