WAF: Site and admin down after latest Jetpack plugin update
-
Hi, on a site where the plugin Jetpack Protect is active (not sure if that is related) and
auto_prepend_file
in PHP is set to/home/xxx/public_html/wp-content/jetpack-waf/bootstrap.php
we got a completely inaccessible front and back-end after the (automatic) upgrade to the latest Jetpack 13.7Turning on WP_DEBUG showed the following error in debug.log:
[07-Aug-2024 00:10:52 UTC] PHP Fatal error: Uncaught Error: Undefined constant Automattic\Jetpack\Waf\Waf_Rules_Manager::IP_ALLOW_LIST_ENABLED_OPTION_NAME in /home/xxx/public_html/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-compatibility.php:31
Stack trace:
0 /home/xxx/public_html/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-initializer.php(37): Automattic\Jetpack\Waf\Waf_Compatibility::add_compatibility_hooks()
1 /home/xxx/public_html/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-config/src/class-config.php(316): Automattic\Jetpack\Waf\Waf_Initializer::init()
2 /home/xxx/public_html/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-config/src/class-config.php(217): Automattic\Jetpack\Config->enable_waf()
3 /home/xxx/public_html/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-config/src/class-config.php(149): Automattic\Jetpack\Config->ensure_feature()
4 /home/xxx/public_html/wp-includes/class-wp-hook.php(324): Automattic\Jetpack\Config->on_plugins_loaded()
5 /home/xxx/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
6 /home/xxx/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
7 /home/xxx/public_html/wp-settings.php(555): do_action()
8 /home/xxx/public_html/wp-config.php(112): require_once('/home/xxx/…')
9 /home/xxx/public_html/wp-load.php(50): require_once('/home/xxx/…')
10 /home/xxx/public_html/wp-blog-header.php(13): require_once('/home/xxx/…')
11 /home/xxx/public_html/index.php(17): require('/home/xxx/…')
12 {main}I had to temporarily remove the auto_prepend_file rule from php.ini to be able to log in again. Then I remove the (one) IP that was added to the WAF whitelist.
After that, setting the old auto_prepend_file rule did not break the site and I could even add the IP back to the whitelist without any problems.
Strange.
- You must be logged in to reply to this topic.