diff --git a/CHANGELOG.md b/CHANGELOG.md index fa46eb9..54a0287 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 --- +## [2.13.1](https://github.com/crowdsecurity/cs-wordpress-bouncer/releases/tag/v2.13.1) - 2026-01-09 +[_Compare with previous release_](https://github.com/crowdsecurity/cs-wordpress-bouncer/compare/v2.13.0...v2.13.1) + +### Fixed + +- Do not display configuration errors during activation as it is normal for configurations not to be defined yet + + +--- + + ## [2.13.0](https://github.com/crowdsecurity/cs-wordpress-bouncer/releases/tag/v2.13.0) - 2025-12-12 [_Compare with previous release_](https://github.com/crowdsecurity/cs-wordpress-bouncer/compare/v2.12.0...v2.13.0) diff --git a/crowdsec.php b/crowdsec.php index 9bae96a..228c9ce 100644 --- a/crowdsec.php +++ b/crowdsec.php @@ -4,7 +4,7 @@ * Plugin URI: https://github.com/crowdsecurity/cs-wordpress-bouncer * Description: Safer Together. Protect your WordPress application with CrowdSec. * Tags: security, captcha, ip-blocker, crowdsec, hacker-protection, appsec - * Version: 2.13.0 + * Version: 2.13.1 * Author: CrowdSec * Author URI: https://www.crowdsec.net/ * Github: https://github.com/crowdsecurity/cs-wordpress-bouncer @@ -13,7 +13,7 @@ * Requires PHP: 7.2 * Requires at least: 4.9 * Tested up to: 6.9 - * Stable tag: 2.13.0 + * Stable tag: 2.13.1 * Text Domain: crowdsec-wp * First release: 2021. */ diff --git a/inc/Admin/init.php b/inc/Admin/init.php index 357727b..d73454f 100644 --- a/inc/Admin/init.php +++ b/inc/Admin/init.php @@ -235,39 +235,20 @@ function displayBouncerMetricsInAdminPage() 'file' => $e->getFile(), 'line' => $e->getLine(), ]); + AdminNotice::displayError('Technical error while displaying remediation metrics: ' . esc_html($e->getMessage())); } - AdminNotice::displayError('Technical error while displaying remediation metrics: ' . esc_html($e->getMessage())); return ''; } } function displayPushMetricsInAdminPage($isPushEnabled = false) { - try { - $configs = getDatabaseConfigs(); - $bouncer = new Bouncer($configs); - if( $isPushEnabled) { - return '
'; - } - return ''; - - } - catch (Exception $e) { - if (isset($bouncer) && $bouncer->getLogger()) { - $bouncer->getLogger()->error('', [ - 'type' => 'WP_EXCEPTION_WHILE_DISPLAYING_RESET_METRICS', - 'message' => $e->getMessage(), - 'code' => $e->getCode(), - 'file' => $e->getFile(), - 'line' => $e->getLine(), - ]); - } - AdminNotice::displayError('Technical error while displaying reset metrics button: ' . esc_html($e->getMessage())); - return ''; + if( $isPushEnabled) { + return ''; } - + return ''; } diff --git a/inc/Constants.php b/inc/Constants.php index daa66cd..b4b5702 100644 --- a/inc/Constants.php +++ b/inc/Constants.php @@ -21,5 +21,5 @@ class Constants extends LibConstants public const BOUNCER_NAME = 'wordpress-bouncer'; public const DEFAULT_BASE_FILE_PATH = __DIR__ . '/../../../../wp-content/uploads/crowdsec/'; public const STANDALONE_CONFIG_PATH = __DIR__ . '/standalone-settings.php'; - public const VERSION = 'v2.13.0'; + public const VERSION = 'v2.13.1'; } diff --git a/readme.txt b/readme.txt index 0008db9..4a6e409 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://crowdsec.net/ Tags: security, captcha, ip-blocker, crowdsec, hacker-protection Requires at least: 4.9 Tested up to: 6.9 -Stable tag: 2.13.0 +Stable tag: 2.13.1 Requires PHP: 7.2 License: MIT License URI: https://opensource.org/licenses/MIT