// Brute Force Protection if ( isset( $request['brute_force_protection'] ) ) { $enable_brute_force = (bool) $request['brute_force_protection']; $brute_force_protection_toggled = $enable_brute_force ? Brute_Force_Protection::enable() : Brute_Force_Protection::disable(); if ( ! $brute_force_protection_toggled ) { return new WP_Error( $enable_brute_force ? 'brute_force_protection_activation_failed' : 'brute_force_protection_deactivation_failed', $enable_brute_force ? __( 'Brute force protection could not be activated.', 'jetpack-waf' ) : __( 'Brute force protection could not be deactivated.', 'jetpack-waf' ), array( 'status' => 500 ) ); } } // Only attempt to update the WAF if the module is supported if ( Waf_Runner::is_supported_environment() ) { try { Waf_Runner::update_waf(); } catch ( Waf_Exception $e ) { return $e->get_wp_error(); } } return self::waf(); } /** * WAF Endpoint Permissions Callback * * @return bool|WP_Error True if user can view the Jetpack admin page. */ public static function waf_permissions_callback() { if ( current_user_can( 'manage_options' ) ) { return true; } return new WP_Error( 'invalid_user_permission_manage_options', REST_Connector::get_user_permissions_error_msg(), array( 'status' => rest_authorization_required_code() ) ); } }
Fatal error: Uncaught Error: Class "Automattic\Jetpack\Waf\REST_Controller" not found in /htdocs/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-initializer.php:40 Stack trace: #0 /htdocs/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-config/src/class-config.php(316): Automattic\Jetpack\Waf\Waf_Initializer::init() #1 /htdocs/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-config/src/class-config.php(217): Automattic\Jetpack\Config->enable_waf() #2 /htdocs/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-config/src/class-config.php(149): Automattic\Jetpack\Config->ensure_feature('waf') #3 /htdocs/wp-includes/class-wp-hook.php(324): Automattic\Jetpack\Config->on_plugins_loaded('') #4 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #5 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #6 /htdocs/wp-settings.php(559): do_action('plugins_loaded') #7 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...') #8 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #9 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #10 /htdocs/index.php(17): require('/htdocs/wp-blog...') #11 {main} thrown in /htdocs/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-waf/src/class-waf-initializer.php on line 40