Skip to content

Commit d82ef73

Browse files
feat(*): Prepare release 1.7.0
1 parent 2886056 commit d82ef73

File tree

7 files changed

+28
-16
lines changed

7 files changed

+28
-16
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [1.7.0] - 2022-07-21
8+
9+
### Added
10+
- Add geolocation feature
11+
12+
### Changed
13+
- Do not throw exception if empty api url as it is the default after a fresh install and activation
14+
- Changed default value for some boolean value as WordPress config are always string
715

816
## [1.6.0] - 2022-06-30
917

crowdsec.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Plugin URI: https://github.com/crowdsecurity/cs-wordpress-bouncer
55
* Description: Safer Together. Protect your WordPress application with CrowdSec.
66
* Tags: crowdsec-bouncer, wordpress, security, firewall, captcha, ip-scanner, ip-blocker, ip-blocking, ip-address, ip-database, ip-range-check, crowdsec, ban-hosts, ban-management, anti-hacking, hacker-protection, captcha-image, captcha-generator, captcha-generation, captcha-service
7-
* Version: 1.6.0
7+
* Version: 1.7.0
88
* Author: CrowdSec
99
* Author URI: https://www.crowdsec.net/
1010
* Github: https://github.com/crowdsecurity/cs-wordpress-blocker
@@ -13,7 +13,7 @@
1313
* Requires PHP: 7.2
1414
* Requires at least: 4.9
1515
* Tested up to: 6.0
16-
* Stable tag: 1.6.0
16+
* Stable tag: 1.7.0
1717
* Text Domain: crowdsec-wp
1818
* First release: 2021.
1919
*/

inc/Bounce.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public function shouldBounceCurrentIp(): bool
231231
return false;
232232
}
233233

234-
$shouldNotBounceWpAdmin = !empty($this->getStringSettings('crowdsec_public_website_only'));
234+
$shouldNotBounceWpAdmin = $this->getBoolSettings('crowdsec_public_website_only');
235235
// when the "crowdsec_public_website_only" is disabled...
236236
if ($shouldNotBounceWpAdmin) {
237237
// In standalone context, is_admin() does not work. So we check admin section with another method.

inc/constants.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function crowdsecDefineConstants(string $crowdsecRandomLogFolder)
88
define('CROWDSEC_DEBUG_LOG_PATH', __DIR__."/../logs/$crowdsecRandomLogFolder/debug.log");
99
define('CROWDSEC_CACHE_PATH', __DIR__.'/../.cache');
1010
define('CROWDSEC_CONFIG_PATH', __DIR__.'/standalone-settings.php');
11-
define('CROWDSEC_BOUNCER_USER_AGENT', 'WordPress CrowdSec Bouncer/v1.6.0');
11+
define('CROWDSEC_BOUNCER_USER_AGENT', 'WordPress CrowdSec Bouncer/v1.7.0');
1212
define('CROWDSEC_BOUNCER_GEOLOCATION_DIR', __DIR__.'/../geolocation');
1313
}
1414
}

inc/options-config.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ function getCrowdSecOptionsConfig()
88
['name' => 'crowdsec_api_url', 'default' => '', 'autoInit' => true],
99
['name' => 'crowdsec_api_key', 'default' => '', 'autoInit' => true],
1010
['name' => 'crowdsec_bouncing_level', 'default' => Constants::BOUNCING_LEVEL_NORMAL, 'autoInit' => true],
11-
['name' => 'crowdsec_public_website_only', 'default' => true, 'autoInit' => true],
12-
['name' => 'crowdsec_stream_mode', 'default' => false, 'autoInit' => true],
11+
['name' => 'crowdsec_public_website_only', 'default' => 'on', 'autoInit' => true],
12+
['name' => 'crowdsec_stream_mode', 'default' => '', 'autoInit' => true],
1313
['name' => 'crowdsec_stream_mode_refresh_frequency', 'default' => 60, 'autoInit' => true],
1414
['name' => 'crowdsec_cache_system', 'default' => Constants::CACHE_SYSTEM_PHPFS, 'autoInit' => true],
1515
['name' => 'crowdsec_redis_dsn', 'default' => '', 'autoInit' => true],
@@ -21,7 +21,7 @@ function getCrowdSecOptionsConfig()
2121
['name' => 'crowdsec_geolocation_cache_duration', 'default' => Constants::CACHE_EXPIRATION_FOR_GEO,
2222
'autoInit' => true],
2323
['name' => 'crowdsec_fallback_remediation', 'default' => Constants::REMEDIATION_CAPTCHA, 'autoInit' => true],
24-
['name' => 'crowdsec_hide_mentions', 'default' => false, 'autoInit' => true],
24+
['name' => 'crowdsec_hide_mentions', 'default' => '', 'autoInit' => true],
2525
['name' => 'crowdsec_trust_ip_forward_array', 'default' => [], 'autoInit' => true],
2626
['name' => 'crowdsec_theme_color_text_primary', 'default' => 'black', 'autoInit' => true],
2727
['name' => 'crowdsec_theme_color_text_secondary', 'default' => '#AAA', 'autoInit' => true],
@@ -45,12 +45,12 @@ function getCrowdSecOptionsConfig()
4545
['name' => 'crowdsec_theme_text_ban_wall_footer', 'default' => '', 'autoInit' => true],
4646
['name' => 'crowdsec_theme_custom_css', 'default' => '', 'autoInit' => true],
4747
['name' => 'crowdsec_random_log_folder', 'default' => bin2hex(random_bytes(64)), 'autoInit' => false],
48-
['name' => 'crowdsec_debug_mode', 'default' => false, 'autoInit' => true],
49-
['name' => 'crowdsec_display_errors', 'default' => false, 'autoInit' => true],
50-
['name' => 'crowdsec_forced_test_ip', 'default' => "", 'autoInit' => true],
51-
['name' => 'crowdsec_forced_test_forwarded_ip', 'default' => "", 'autoInit' => true],
52-
['name' => 'crowdsec_geolocation_enabled', 'default' => false, 'autoInit' => true],
53-
['name' => 'crowdsec_geolocation_save_result', 'default' => false, 'autoInit' => true],
48+
['name' => 'crowdsec_debug_mode', 'default' => '', 'autoInit' => true],
49+
['name' => 'crowdsec_display_errors', 'default' => '', 'autoInit' => true],
50+
['name' => 'crowdsec_forced_test_ip', 'default' => '', 'autoInit' => true],
51+
['name' => 'crowdsec_forced_test_forwarded_ip', 'default' => '', 'autoInit' => true],
52+
['name' => 'crowdsec_geolocation_enabled', 'default' => '', 'autoInit' => true],
53+
['name' => 'crowdsec_geolocation_save_result', 'default' => '', 'autoInit' => true],
5454
['name' => 'crowdsec_geolocation_type', 'default' => Constants::GEOLOCATION_TYPE_MAXMIND, 'autoInit' => true],
5555
['name' => 'crowdsec_geolocation_maxmind_database_type', 'default' => Constants::MAXMIND_COUNTRY, 'autoInit' => true],
5656
['name' => 'crowdsec_geolocation_maxmind_database_path', 'default' => '', 'autoInit' => true],

readme.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Donate link: https://crowdsec.net/
44
Tags: crowdsec-bouncer, wordpress, security, firewall, captcha, ip-scanner, ip-blocker, ip-blocking, ip-address, ip-database, ip-range-check, crowdsec, ban-hosts, ban-management, anti-hacking, hacker-protection, captcha-image, captcha-generator, captcha-generation, captcha-service
55
Requires at least: 4.9
66
Tested up to: 6.0
7-
Stable tag: 1.6.0
7+
Stable tag: 1.7.0
88
Requires PHP: 7.2
99
License: MIT
1010
License URI: https://opensource.org/licenses/MIT
@@ -44,6 +44,10 @@ This WordPress plugin is a "bouncer", which purpose is to block detected attacks
4444

4545
== Changelog ==
4646

47+
= 1.7 (2022-07-20) =
48+
49+
- Add geolocation feature
50+
4751
= 1.6 (2022-06-30) =
4852

4953
- Add "Test bouncing" action in settings view

vendor/composer/installed.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
'name' => 'crowdsec/wordpress-bouncer',
44
'pretty_version' => 'dev-main',
55
'version' => 'dev-main',
6-
'reference' => '8338134f4c0fae905e3f3a9ddc6fdb5e1a300697',
6+
'reference' => '288605677f43acbab27d0d8ae742a6a91af19006',
77
'type' => 'project',
88
'install_path' => __DIR__ . '/../../',
99
'aliases' => array(),
@@ -31,7 +31,7 @@
3131
'crowdsec/wordpress-bouncer' => array(
3232
'pretty_version' => 'dev-main',
3333
'version' => 'dev-main',
34-
'reference' => '8338134f4c0fae905e3f3a9ddc6fdb5e1a300697',
34+
'reference' => '288605677f43acbab27d0d8ae742a6a91af19006',
3535
'type' => 'project',
3636
'install_path' => __DIR__ . '/../../',
3737
'aliases' => array(),

0 commit comments

Comments
 (0)