= array( 'jetpack/jetpack.php', 'jetpack-protect/jetpack-protect.php' ); // Only run on upgrades affecting plugins if ( 'plugin' !== $hook_extra['type'] ) { return; } // Only run on updates and installations if ( 'update' !== $hook_extra['action'] && 'install' !== $hook_extra['action'] ) { return; } // Only run when Jetpack plugins were affected if ( 'update' === $hook_extra['action'] && ! empty( $hook_extra['plugins'] ) && empty( array_intersect( $jetpack_plugins_with_waf, $hook_extra['plugins'] ) ) ) { return; } if ( 'install' === $hook_extra['action'] && ! empty( $upgrader->new_plugin_data['TextDomain'] ) && empty( in_array( $upgrader->new_plugin_data['TextDomain'], $jetpack_text_domains_with_waf, true ) ) ) { return; } update_option( self::NEEDS_UPDATE_OPTION_NAME, true ); } /** * Check for WAF update * * Updates the WAF when the "needs update" option is enabled. * * @return bool|WP_Error True if the WAF is up-to-date or was sucessfully updated, WP_Error if the update failed. */ public static function check_for_updates() { if ( get_option( self::NEEDS_UPDATE_OPTION_NAME ) ) { if ( Waf_Runner::is_supported_environment() ) { // Compatiblity patch for cases where an outdated WAF_Constants class has been // autoloaded by the standalone bootstrap execution at the beginning of the current request. if ( ! method_exists( Waf_Constants::class, 'define_mode' ) ) { try { ( new Waf_Standalone_Bootstrap() )->generate(); } catch ( Waf_Exception $e ) { return $e->get_wp_error(); } } Waf_Compatibility::run_compatibility_migrations(); Waf_Constants::define_mode(); if ( ! Waf_Runner::is_allowed_mode( JETPACK_WAF_MODE ) ) { return new WP_Error( 'waf_mode_invalid', 'Invalid firewall mode.' ); } try { Waf_Rules_Manager::generate_ip_rules(); Waf_Rules_Manager::generate_rules(); ( new Waf_Standalone_Bootstrap() )->generate(); } catch ( Waf_Exception $e ) { return $e->get_wp_error(); } } else { // If the site doesn't support the request firewall, // just migrate the IP allow list used by brute force protection. Waf_Compatibility::migrate_brute_force_protection_ip_allow_list(); } update_option( self::NEEDS_UPDATE_OPTION_NAME, false ); } return true; } /** * Disables the WAF module when on an unsupported platform in Jetpack. * * @param array $modules Filterable value for `jetpack_get_available_modules`. * * @return array Array of module slugs. */ public static function remove_module_on_unsupported_environments( $modules ) { if ( ! Waf_Runner::is_supported_environment() ) { // WAF should never be available on unsupported platforms. unset( $modules['waf'] ); } return $modules; } /** * Disables the WAF module when on an unsupported platform in a standalone plugin. * * @param array $modules Filterable value for `jetpack_get_available_standalone_modules`. * * @return array Array of module slugs. */ public static function remove_standalone_module_on_unsupported_environments( $modules ) { if ( ! Waf_Runner::is_supported_environment() ) { // WAF should never be available on unsupported platforms. $modules = array_filter( $modules, function ( $module ) { return $module !== 'waf'; } ); } return $modules; } } BCLCC – ici1fo

FLASH INFO

Burkina Faso : La BCLCC démantèle deux réseaux présumés de cyberdélinquants

Deux réseaux présumés de cyberdélinquants ont été arrêtés par la Brigade Centrale de Lutte Contre la Cybercriminalité (BCLCC) et présentés à la presse ce jeudi 13 juin 2024 matin à Ouagadougou, comme constaté par ICI1FO sur place. Composés de huit individus, ces réseaux ont été impliqués dans des escroqueries sophistiquées. Le premier réseau, composé de […]

impossible de copier

Search

Catégories

©  ici1fo – crée par kabefo