Skip to content

Commit 5d11f87

Browse files
fix(admin): Fix incorrect log and cache paths
1 parent 0cc06d1 commit 5d11f87

File tree

6 files changed

+17
-10
lines changed

6 files changed

+17
-10
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ jobs:
143143
144144
- name: Create release ${{ env.VERSION_NUMBER }} with Wordpress zip
145145
if: github.event.inputs.deploy_to_wordpress == 'true'
146-
uses: softprops/action-gh-release@v1
146+
uses: softprops/action-gh-release@v2
147147
with:
148148
files: crowdsec.zip
149149
body_path: CHANGELOG.txt
@@ -154,7 +154,7 @@ jobs:
154154

155155
- name: Create release ${{ env.VERSION_NUMBER }} without Wordpress zip
156156
if: github.event.inputs.deploy_to_wordpress != 'true'
157-
uses: softprops/action-gh-release@v1
157+
uses: softprops/action-gh-release@v2
158158
with:
159159
body_path: CHANGELOG.txt
160160
name: ${{ env.VERSION_NUMBER }}

CHANGELOG.md

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

7+
## [2.6.1](https://github.com/crowdsecurity/cs-wordpress-bouncer/releases/tag/v2.6.1) - 2024-03-14
8+
[_Compare with previous release_](https://github.com/crowdsecurity/cs-wordpress-bouncer/compare/v2.6.0...v2.6.1)
9+
10+
### Fixed
11+
12+
- Fix incorrect log and cache paths in admin view
13+
714

815
## [2.6.0](https://github.com/crowdsecurity/cs-wordpress-bouncer/releases/tag/v2.6.0) - 2024-03-14
916
[_Compare with previous release_](https://github.com/crowdsecurity/cs-wordpress-bouncer/compare/v2.5.2...v2.6.0)

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: 2.6.0
7+
* Version: 2.6.1
88
* Author: CrowdSec
99
* Author URI: https://www.crowdsec.net/
1010
* Github: https://github.com/crowdsecurity/cs-wordpress-bouncer
@@ -13,7 +13,7 @@
1313
* Requires PHP: 7.2
1414
* Requires at least: 4.9
1515
* Tested up to: 6.4
16-
* Stable tag: 2.6.0
16+
* Stable tag: 2.6.1
1717
* Text Domain: crowdsec-wp
1818
* First release: 2021.
1919
*/

inc/Constants.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ class Constants extends LibConstants
1919

2020
public const DEFAULT_BASE_FILE_PATH = __DIR__ . '/../../../../wp-content/uploads/crowdsec/';
2121
public const STANDALONE_CONFIG_PATH = __DIR__ . '/standalone-settings.php';
22-
public const VERSION = 'v2.6.0';
22+
public const VERSION = 'v2.6.1';
2323
}

inc/admin/advanced-settings.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ function crowdsec_multi_save_advanced_settings()
257257
}, ((Constants::CACHE_SYSTEM_PHPFS === $cacheSystem) ?
258258
'<input style="margin-right:10px" type="button" id="crowdsec_prune_cache" value="Prune now" class="button button-secondary" onclick="document.getElementById(\'crowdsec_action_prune_cache\').submit();">' : '').
259259
'<p>The File system cache is faster than calling Local API. Redis or Memcached is faster than the File System cache.<br>
260-
<b>Important note: </b> If you use the File system cache, make sure the <i>wp-content/plugins/crowdsec/.cache</i> path is not publicly accessible.<br>
260+
<b>Important note: </b> If you use the File system cache, make sure the <i>wp-content/uploads/crowdsec/cache</i> path is not publicly accessible.<br>
261261
Please refer to <a target="_blank" href="https://github.com/crowdsecurity/cs-wordpress-bouncer/blob/main/docs/USER_GUIDE.md#security">the documentation to deny direct access to this folder.</a></p>', [
262262
Constants::CACHE_SYSTEM_PHPFS => 'File system',
263263
Constants::CACHE_SYSTEM_REDIS => 'Redis',
@@ -510,17 +510,17 @@ function convertInlineIpRangesToComparableIpBounds(string $inlineIpRanges): arra
510510

511511
add_settings_section('crowdsec_admin_advanced_debug', 'Debug mode', function () {
512512
echo 'Configure the debug mode.<br>
513-
<b>Important note: </b> Make sure the <i>wp-content/plugins/crowdsec/logs</i> path is not publicly accessible.<br>
513+
<b>Important note: </b> Make sure the <i>wp-content/uploads/crowdsec/logs</i> path is not publicly accessible.<br>
514514
Please refer to <a target="_blank" href="https://github.com/crowdsecurity/cs-wordpress-bouncer/blob/main/docs/USER_GUIDE.md#security">the documentation to deny direct access to this folder.</a>';
515515
}, 'crowdsec_advanced_settings');
516516

517517
// Field "crowdsec_debug_mode"
518518
addFieldCheckbox('crowdsec_debug_mode', 'Enable debug mode', 'crowdsec_plugin_advanced_settings', 'crowdsec_advanced_settings', 'crowdsec_admin_advanced_debug', function () {}, function () {}, '
519-
<p>Should not be used in production.<br>When this mode is enabled, a <i>debug.log</i> file will be written in the <i>wp-content/plugins/crowdsec/logs</i> folder.</p>');
519+
<p>Should not be used in production.<br>When this mode is enabled, a <i>debug.log</i> file will be written in the <i>wp-content/uploads/crowdsec/logs</i> folder.</p>');
520520

521521
// Field "crowdsec_disable_prod_log"
522522
addFieldCheckbox('crowdsec_disable_prod_log', 'Disable prod log', 'crowdsec_plugin_advanced_settings', 'crowdsec_advanced_settings', 'crowdsec_admin_advanced_debug', function () {}, function () {}, '
523-
<p>By default, a <i>prod.log</i> file will be written in the <i>wp-content/plugins/crowdsec/logs</i> folder.<br>You can disable this log here.</p>');
523+
<p>By default, a <i>prod.log</i> file is written in the <i>wp-content/uploads/crowdsec/logs</i> folder.<br>You can disable this log here.</p>');
524524

525525
// Field "Custom User Agent"
526526
addFieldString('crowdsec_custom_user_agent', 'Custom User-Agent', 'crowdsec_plugin_advanced_settings', 'crowdsec_advanced_settings', 'crowdsec_admin_advanced_debug', function ($input) {

readme.txt

Lines changed: 1 addition & 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.4
7-
Stable tag: 2.6.0
7+
Stable tag: 2.6.1
88
Requires PHP: 7.2
99
License: MIT
1010
License URI: https://opensource.org/licenses/MIT

0 commit comments

Comments
 (0)