mainwp / mainwp-child

The MainWP Child plugin is installed on the WordPress sites that you want to control from the MainWP Dashboard.
https://mainwp.com
GNU General Public License v3.0
93 stars 54 forks source link

Support Case Insensitive Security checks #326

Closed BenB196 closed 1 year ago

BenB196 commented 2 years ago

Describe the bug Today, Security checks appear to be case sensitive; Example: https://github.com/mainwp/mainwp-child/blob/1c176473001fd698e810434463a9e06cff42ebd6/class/class-mainwp-security.php#L454 looks only for off, but doesn't account for things like Off or OFF

To Reproduce Steps to reproduce the behavior:

  1. Setup WordPress
  2. Disable PHP logging with non-lowercase value:
    I have no name!@wordpress-78f5777878-p4rwq:/opt/bitnami/wordpress$ cat /opt/bitnami/php/etc/php.ini | grep display_error
    ; display_errors
    display_errors = Off
    ; separately from display_errors. We strongly recommend you set this to 'off'
    I have no name!@wordpress-78f5777878-p4rwq:/opt/bitnami/wordpress$ cat /opt/bitnami/php/etc/php.ini | grep display_startup_errors
    ; display_startup_errors
    display_startup_errors = Off
  3. Notice on the MainWP Dashboard that it doesn't think PHP error reporting is disabled

Expected behavior I would expect MainWP to perform case insensitive checks for things like these security settings.

Screenshots image

bogdan-mainwp commented 2 years ago

Hi @BenB196,

thanks for reporting this, I will have our dev team check this asap.

bogdan-mainwp commented 1 year ago

Fixed in 4.2.6