Skip to content

Conversation

@chopins
Copy link
Contributor

@chopins chopins commented Feb 3, 2026

Currently, in PHP, users can upload files to the server under any circumstances, even if the PHP script does not include file upload handling.
This not only unnecessarily increases server bandwidth usage but also introduces the security risk of arbitrary file uploads to the server. like : hitcon-ctf-2018-one-line-php-challenge.
So add multipart_uri_whitelist PHP_INI_PERDIR ini option to Allow file uploads only from whitelisted paths.

@chopins chopins requested a review from bukka as a code owner February 3, 2026 07:14
@iluuu1994
Copy link
Member

Seems more like a webserver responsibility, but I'll let Jakub be the judge of that.

@chopins
Copy link
Contributor Author

chopins commented Feb 4, 2026

Seems more like a webserver responsibility, but I'll let Jakub be the judge of that.

The issue that PHP automatically saves uploaded files to temporary files should still be addressed.
Additionally, since the server cannot determine whether the php script will handle the file upload, PHP needs to make that determination.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants