BoldGrid / boldgrid-backup

The Total Upkeep plugin.
GNU General Public License v2.0
11 stars 9 forks source link

[Bug] Allow for spaces in disable_functions comma-separated list #449

Closed jessecowens closed 3 years ago

jessecowens commented 3 years ago

Describe the bug If a user's php.ini includes spaces in the ini_get('disable_functions') , the plugin will try to use disabled functions, causing PHP Warnings.

To Reproduce Steps to reproduce the behavior:

  1. Create a php.ini with the following line: disable_functions = "mail, popen, proc_open, exec, shell_exec, passthru, system"
  2. Enable WP_DEBUG and WP_DEBUG_LOG
  3. Install Total Upkeep
  4. See errors similar to the following: 12-Feb-2021 21:06:38 UTC] PHP Warning: popen() has been disabled for security reasons in /home/jesseo/public_html/support/wp-content/plugins/boldgrid-backup/admin/class-boldgrid-backup-admin-cli.php on line 133

Expected behavior The function should strip extraneous whitespace from the array of disabled functions for proper matching.

Additional context This issue was reported in the WordPress.org Forums