Skip to content

Commit 778fc96

Browse files
feat(*): Prepare release 4.0.0
1 parent 1428b72 commit 778fc96

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

CHANGELOG.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ As far as possible, we try to adhere to [Symfony guidelines](https://symfony.com
1111

1212
---
1313

14-
## [4.0.0](https://github.com/crowdsecurity/php-cs-bouncer/releases/tag/v4.0.0) - 202?-??-??
15-
[_Compare with previous release_](https://github.com/crowdsecurity/php-cs-bouncer/compare/v3.2.0...HEAD)
14+
## [4.0.0](https://github.com/crowdsecurity/php-cs-bouncer/releases/tag/v4.0.0) - 2025-01-09
15+
[_Compare with previous release_](https://github.com/crowdsecurity/php-cs-bouncer/compare/v3.2.0...v4.0.0)
1616

17-
**This release is not yet published**
1817

1918
### Added
2019

src/AbstractBouncer.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,9 @@ protected function handleRemediation(string $remediation, string $ip, string $or
472472
case Constants::REMEDIATION_BYPASS:
473473
default:
474474
// Increment clean origin count
475-
$finalOrigin = $origin === AbstractCache::CLEAN_APPSEC ? AbstractCache::CLEAN_APPSEC : AbstractCache::CLEAN;
475+
$finalOrigin = AbstractCache::CLEAN_APPSEC === $origin ?
476+
AbstractCache::CLEAN_APPSEC :
477+
AbstractCache::CLEAN;
476478
$this->getRemediationEngine()->updateMetricsOriginsCount(
477479
$finalOrigin,
478480
Constants::REMEDIATION_BYPASS
@@ -709,7 +711,7 @@ private function handleCaptchaRemediation(string $ip, string $origin): void
709711
$this->displayCaptchaWall($ip);
710712
}
711713
// Increment clean origin count
712-
$finalOrigin = $origin === AbstractCache::CLEAN_APPSEC ? AbstractCache::CLEAN_APPSEC : AbstractCache::CLEAN;
714+
$finalOrigin = AbstractCache::CLEAN_APPSEC === $origin ? AbstractCache::CLEAN_APPSEC : AbstractCache::CLEAN;
713715
$this->getRemediationEngine()->updateMetricsOriginsCount(
714716
$finalOrigin,
715717
Constants::REMEDIATION_BYPASS

src/Constants.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Constants extends RemConstants
3131
/** @var string Path for html templates folder (e.g. ban and captcha wall) */
3232
public const TEMPLATES_DIR = __DIR__ . '/templates';
3333
/** @var string The last version of this library */
34-
public const VERSION = 'v3.2.0';
34+
public const VERSION = 'v4.0.0';
3535
/** @var string The "disabled" x-forwarded-for setting */
3636
public const X_FORWARDED_DISABLED = 'no_forward';
3737
}

0 commit comments

Comments
 (0)