From 5d11f87f267af7b095dfab89e759c746e72a9db1 Mon Sep 17 00:00:00 2001 From: Julien Loizelet Date: Thu, 14 Mar 2024 16:49:15 +0900 Subject: [PATCH] fix(admin): Fix incorrect log and cache paths --- .github/workflows/release.yml | 4 ++-- CHANGELOG.md | 7 +++++++ crowdsec.php | 4 ++-- inc/Constants.php | 2 +- inc/admin/advanced-settings.php | 8 ++++---- readme.txt | 2 +- 6 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 59409949..1942fe8c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -143,7 +143,7 @@ jobs: - name: Create release ${{ env.VERSION_NUMBER }} with Wordpress zip if: github.event.inputs.deploy_to_wordpress == 'true' - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: files: crowdsec.zip body_path: CHANGELOG.txt @@ -154,7 +154,7 @@ jobs: - name: Create release ${{ env.VERSION_NUMBER }} without Wordpress zip if: github.event.inputs.deploy_to_wordpress != 'true' - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: body_path: CHANGELOG.txt name: ${{ env.VERSION_NUMBER }} diff --git a/CHANGELOG.md b/CHANGELOG.md index aa1a55d1..4fca05a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,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) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.6.1](https://github.com/crowdsecurity/cs-wordpress-bouncer/releases/tag/v2.6.1) - 2024-03-14 +[_Compare with previous release_](https://github.com/crowdsecurity/cs-wordpress-bouncer/compare/v2.6.0...v2.6.1) + +### Fixed + +- Fix incorrect log and cache paths in admin view + ## [2.6.0](https://github.com/crowdsecurity/cs-wordpress-bouncer/releases/tag/v2.6.0) - 2024-03-14 [_Compare with previous release_](https://github.com/crowdsecurity/cs-wordpress-bouncer/compare/v2.5.2...v2.6.0) diff --git a/crowdsec.php b/crowdsec.php index 66359588..b05d0705 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: 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 - * Version: 2.6.0 + * Version: 2.6.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.4 - * Stable tag: 2.6.0 + * Stable tag: 2.6.1 * Text Domain: crowdsec-wp * First release: 2021. */ diff --git a/inc/Constants.php b/inc/Constants.php index e3933d50..680cb269 100644 --- a/inc/Constants.php +++ b/inc/Constants.php @@ -19,5 +19,5 @@ class Constants extends LibConstants public const DEFAULT_BASE_FILE_PATH = __DIR__ . '/../../../../wp-content/uploads/crowdsec/'; public const STANDALONE_CONFIG_PATH = __DIR__ . '/standalone-settings.php'; - public const VERSION = 'v2.6.0'; + public const VERSION = 'v2.6.1'; } diff --git a/inc/admin/advanced-settings.php b/inc/admin/advanced-settings.php index 1b9d19da..673f0def 100644 --- a/inc/admin/advanced-settings.php +++ b/inc/admin/advanced-settings.php @@ -257,7 +257,7 @@ function crowdsec_multi_save_advanced_settings() }, ((Constants::CACHE_SYSTEM_PHPFS === $cacheSystem) ? '' : ''). '

The File system cache is faster than calling Local API. Redis or Memcached is faster than the File System cache.
-Important note: If you use the File system cache, make sure the wp-content/plugins/crowdsec/.cache path is not publicly accessible.
+Important note: If you use the File system cache, make sure the wp-content/uploads/crowdsec/cache path is not publicly accessible.
Please refer to the documentation to deny direct access to this folder.

', [ Constants::CACHE_SYSTEM_PHPFS => 'File system', Constants::CACHE_SYSTEM_REDIS => 'Redis', @@ -510,17 +510,17 @@ function convertInlineIpRangesToComparableIpBounds(string $inlineIpRanges): arra add_settings_section('crowdsec_admin_advanced_debug', 'Debug mode', function () { echo 'Configure the debug mode.
-Important note: Make sure the wp-content/plugins/crowdsec/logs path is not publicly accessible.
+Important note: Make sure the wp-content/uploads/crowdsec/logs path is not publicly accessible.
Please refer to the documentation to deny direct access to this folder.'; }, 'crowdsec_advanced_settings'); // Field "crowdsec_debug_mode" addFieldCheckbox('crowdsec_debug_mode', 'Enable debug mode', 'crowdsec_plugin_advanced_settings', 'crowdsec_advanced_settings', 'crowdsec_admin_advanced_debug', function () {}, function () {}, ' -

Should not be used in production.
When this mode is enabled, a debug.log file will be written in the wp-content/plugins/crowdsec/logs folder.

'); +

Should not be used in production.
When this mode is enabled, a debug.log file will be written in the wp-content/uploads/crowdsec/logs folder.

'); // Field "crowdsec_disable_prod_log" addFieldCheckbox('crowdsec_disable_prod_log', 'Disable prod log', 'crowdsec_plugin_advanced_settings', 'crowdsec_advanced_settings', 'crowdsec_admin_advanced_debug', function () {}, function () {}, ' -

By default, a prod.log file will be written in the wp-content/plugins/crowdsec/logs folder.
You can disable this log here.

'); +

By default, a prod.log file is written in the wp-content/uploads/crowdsec/logs folder.
You can disable this log here.

'); // Field "Custom User Agent" addFieldString('crowdsec_custom_user_agent', 'Custom User-Agent', 'crowdsec_plugin_advanced_settings', 'crowdsec_advanced_settings', 'crowdsec_admin_advanced_debug', function ($input) { diff --git a/readme.txt b/readme.txt index d00b25f2..290ff99c 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://crowdsec.net/ 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 Requires at least: 4.9 Tested up to: 6.4 -Stable tag: 2.6.0 +Stable tag: 2.6.1 Requires PHP: 7.2 License: MIT License URI: https://opensource.org/licenses/MIT