-
-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
check if ini_set is available to prevent Fatal Errors #1054
Comments
Note that, while this has always triggered error messages, it's only since PHP 8 that this now triggers a Fatal Error. |
|
I think the point of @maltfield is that Counter point would be to not disable |
Update: phpList v3.6.15 (the latest version at the time of writing) is now throwing fatal errors for two additional functions on servers with php security-hardened following best-practices:
Here's example errors messages indicating where the fixes need to take place (see OP for the solution wrapping these function calls with a conditional check of
and
Please let me know if I should open separate tickets for each of these functions. |
There is a bug in phpList that causes Fatal Errors on PHP servers that have been hardened following common best-practices
This line causes a PHP Fatal error on hardened systems with the
ini_set
function disabled.Why this matters
For security reasons, orgs frequently configure
php.ini
to be hardened by adding many dangerous functions to thedisable_functions
variable in thephp.ini
file. For example, it's common to disable theexec
functionOf course, if a php script could modify the php configuration, then it would defeat any hardening done by setting
disable_functions
. As such, it's common to addini_set
to thedisable_functions
Solution
To fix the PHP Fatal error, phpList should always check to see if the
ini_set
function exists before attempting to call itThe text was updated successfully, but these errors were encountered: