Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions crowdsec.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
*/
Expand Down
27 changes: 4 additions & 23 deletions inc/Admin/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<p><input id="crowdsec_push_usage_metrics" style="margin-right:10px" type="button" value="Push remediation metrics now" class="button button-secondary button-small" onclick="document.getElementById(\'crowdsec_action_push_usage_metrics\').submit();"></p>';
}
return '<p><input id="crowdsec_push_usage_metrics" style="margin-right:10px" type="button" disabled="disabled" value="Push remediation metrics now" class="button button-secondary button-small"></p>';

}
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 '<p><input id="crowdsec_push_usage_metrics" style="margin-right:10px" type="button" value="Push remediation metrics now" class="button button-secondary button-small" onclick="document.getElementById(\'crowdsec_action_push_usage_metrics\').submit();"></p>';
}

return '<p><input id="crowdsec_push_usage_metrics" style="margin-right:10px" type="button" disabled="disabled" value="Push remediation metrics now" class="button button-secondary button-small"></p>';
}


Expand Down
2 changes: 1 addition & 1 deletion inc/Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down