From ca183d6e213192ce43fa152e4be12b3040692dd9 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Thu, 18 Dec 2025 09:27:11 +0100 Subject: [PATCH] Some changes in before-date rule wording --- CHANGELOG.md | 2 +- module/CLI/src/RedirectRule/RedirectRuleHandler.php | 2 +- module/CLI/test/RedirectRule/RedirectRuleHandlerTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9585bc34..83f75b8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this ### Added * [#2431](https://github.com/shlinkio/shlink/issues/2431) Add new date-based condition for the dynamic rules redirections system. - * `before-date`: Allows to perform redirections based on an ISO 8601 date value, when the current date and time is earlier than the defined threshold. + * `before-date`: Allows to perform redirections based on an ISO-8601 date value, when the current date and time is earlier than the defined threshold. ### Changed * [#2522](https://github.com/shlinkio/shlink/issues/2522) Shlink no longer tries to detect trusted proxies automatically, when resolving the visitor's IP address, as this is a potential security issue. diff --git a/module/CLI/src/RedirectRule/RedirectRuleHandler.php b/module/CLI/src/RedirectRule/RedirectRuleHandler.php index 689bbb20..0992670d 100644 --- a/module/CLI/src/RedirectRule/RedirectRuleHandler.php +++ b/module/CLI/src/RedirectRule/RedirectRuleHandler.php @@ -125,7 +125,7 @@ class RedirectRuleHandler implements RedirectRuleHandlerInterface $this->askMandatory('City name to match?', $io), ), RedirectConditionType::BEFORE_DATE => RedirectCondition::forBeforeDate( - normalizeDate($this->askMandatory('Date to match? (ISO 8601)', $io)), + normalizeDate($this->askMandatory('Date to match?', $io)), ), }; diff --git a/module/CLI/test/RedirectRule/RedirectRuleHandlerTest.php b/module/CLI/test/RedirectRule/RedirectRuleHandlerTest.php index 60422949..12af8d40 100644 --- a/module/CLI/test/RedirectRule/RedirectRuleHandlerTest.php +++ b/module/CLI/test/RedirectRule/RedirectRuleHandlerTest.php @@ -123,7 +123,7 @@ class RedirectRuleHandlerTest extends TestCase 'IP address, CIDR block or wildcard-pattern (1.2.*.*)' => '1.2.3.4', 'Country code to match?' => 'FR', 'City name to match?' => 'Los angeles', - 'Date to match? (ISO 8601)' => '2016-05-01T20:34:16+02:00', + 'Date to match?' => '2016-05-01T20:34:16+02:00', default => '', }, );