Skip to content

Commit

Permalink
Add explanation firewall inactive when not supported (#40880)
Browse files Browse the repository at this point in the history
* Add tooltip text to let users know when firewall is disabled because of host

* changelog

* Show Inactive always if unsupported

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/12676086063

Upstream-Ref: Automattic/jetpack@3dc2652
  • Loading branch information
CodeyGuyDylan authored and matticbot committed Jan 8, 2025
1 parent 18f54e1 commit 0906bbd
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 12 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [5.3.1-alpha] - unreleased

This is an alpha version! The changes listed here are not final.

### Added
- Add new WAF status on Protect card for when WAF is unsupported

## [5.3.0] - 2025-01-06
### Added
- My Jetpack: Added a new status for when Protect detects threats on the site. [#40628]
Expand Down Expand Up @@ -1895,6 +1902,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Created package

[5.3.1-alpha]: https://github.com/Automattic/jetpack-my-jetpack/compare/5.3.0...5.3.1-alpha
[5.3.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/5.2.0...5.3.0
[5.2.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/5.1.2...5.2.0
[5.1.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/5.1.1...5.1.2
Expand Down
2 changes: 1 addition & 1 deletion build/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('jetpack-connection', 'jetpack-script-data', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '3a7c501ee17d67fa9338');
<?php return array('dependencies' => array('jetpack-connection', 'jetpack-script-data', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '84046aa3393a0eb9cd9c');
14 changes: 7 additions & 7 deletions build/index.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ interface Window {
jetpack_waf_share_data: '1' | '';
jetpack_waf_share_debug_data: boolean;
standalone_mode: boolean;
waf_supported: boolean;
};
};
videopress: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@automattic/jetpack-my-jetpack",
"version": "5.3.0",
"version": "5.3.1-alpha",
"description": "WP Admin page with information and configuration shared among all Jetpack stand-alone plugins",
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/my-jetpack/#readme",
"bugs": {
Expand Down
12 changes: 9 additions & 3 deletions src/class-initializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Initializer {
*
* @var string
*/
const PACKAGE_VERSION = '5.3.0';
const PACKAGE_VERSION = '5.3.1-alpha';

/**
* HTML container ID for the IDC screen on My Jetpack page.
Expand Down Expand Up @@ -236,9 +236,12 @@ public static function enqueue_scripts() {
$scan_data = Products\Protect::get_protect_data();
self::update_historically_active_jetpack_modules();

$waf_config = array();
$waf_config = array();
$waf_supported = false;

if ( class_exists( 'Automattic\Jetpack\Waf\Waf_Runner' ) ) {
$waf_config = Waf_Runner::get_config();
$waf_config = Waf_Runner::get_config();
$waf_supported = Waf_Runner::is_supported_environment();
}

wp_localize_script(
Expand Down Expand Up @@ -297,6 +300,9 @@ public static function enqueue_scripts() {
'scanData' => $scan_data,
'wafConfig' => array_merge(
$waf_config,
array(
'waf_supported' => $waf_supported,
),
array( 'blocked_logins' => (int) get_site_option( 'jetpack_protect_blocked_attempts', 0 ) )
),
),
Expand Down

0 comments on commit 0906bbd

Please sign in to comment.