mainwp-child icon indicating copy to clipboard operation
mainwp-child copied to clipboard

Support Case Insensitive Security checks

Open BenB196 opened this issue 3 years ago • 1 comments

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
  1. 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

BenB196 avatar Aug 03 '22 17:08 BenB196

Hi @BenB196,

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

bogdan-mainwp avatar Aug 03 '22 18:08 bogdan-mainwp

Fixed in 4.2.6

bogdan-mainwp avatar Mar 15 '23 17:03 bogdan-mainwp