wp-media / wp-rocket

Performance optimization plugin for WordPress
https://wp-rocket.me
GNU General Public License v2.0
687 stars 215 forks source link

RUCSS allowlisted IP isn't removed from Wordfence's options #5249

Closed vmanthos closed 2 years ago

vmanthos commented 2 years ago

Before submitting an issue please check that you’ve completed the following steps:

Describe the bug

We allowlist the RUCSS SaaS IP here: https://github.com/wp-media/wp-rocket/blob/98a11540dc19c3ae598d7361e0b7ecee79045df9/inc/ThirdParty/Plugins/Security/WordFenceCompatibility.php#L17

That's added in Wordfence > All Options > Advanced Firewall Options > Allowlisted IP addresses that bypass all rules.

When:

the IP isn't removed from that text area.

Also, when updating WP Rocket and that IP has changed, the old IP isn't replaced by the new one. Instead both are kept in place.

To Reproduce

Steps to reproduce the behavior:

  1. Install Wordfence.
  2. Check Wordfence > All Options > Advanced Firewall Options > Allowlisted IP addresses that bypass all rules. The current IP will be added there.
  3. Deactivate/uninstall WP Rocket and check the field again. The IP will still be there.
  4. Install WP Rocket again (3.11.4.2) and update it to a version with a different IP, e.g. 3.11.5.
  5. Repeat step 4. Both IPs will be in place.

Expected behavior

  1. When deactivating/uninstalling WP Rocket the IP should be removed from Wordfence's settings.
  2. When updating WP Rocket and the IP has changed, only the new one should be preserved.

Additional context

This came up while doing QA for #5233.

Backlog Grooming (for WP Media dev team use only)

jeawhanlee commented 2 years ago

Identify the root cause ✅

We are currently not handling the updating the ip on wordfence whitelist.

Scope a solution ✅

I propose:

Estimate the effort ✅

[S]