From aa98920aa97a2c852921003401acad99baacce9e Mon Sep 17 00:00:00 2001 From: IKEDA Soji Date: Wed, 29 Nov 2023 09:25:49 +0900 Subject: [PATCH 1/2] Missing validation on Digest frequency in Edit Config (#1742) --- src/lib/Sympa/Config/Schema.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/Sympa/Config/Schema.pm b/src/lib/Sympa/Config/Schema.pm index 6dc9aa661..402a35ae3 100644 --- a/src/lib/Sympa/Config/Schema.pm +++ b/src/lib/Sympa/Config/Schema.pm @@ -871,7 +871,7 @@ our %pinfo = ( context => [qw(list)], order => 2, gettext_id => "hour", - format => '\d+', + format => '[01]?[0-9]|2[0-3]', occurrence => '1', length => 2 }, @@ -879,7 +879,7 @@ our %pinfo = ( context => [qw(list)], order => 3, gettext_id => "minute", - format => '\d+', + format => '[0-5]?[0-9]', occurrence => '1', length => 2 } From 3c37ca0fb38e12f6578ae5b55fd203c19e9a54f4 Mon Sep 17 00:00:00 2001 From: IKEDA Soji Date: Wed, 29 Nov 2023 23:08:19 +0900 Subject: [PATCH 2/2] additional fix --- src/lib/Sympa/Config.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/Sympa/Config.pm b/src/lib/Sympa/Config.pm index 28f96907f..4d8802730 100644 --- a/src/lib/Sympa/Config.pm +++ b/src/lib/Sympa/Config.pm @@ -815,7 +815,7 @@ sub _validate_changes_leaf { {p_info => $pitem, p_paths => $ppaths, value => $new} ]; return 'invalid'; - } elsif (ref $format ne 'ARRAY' and not $new =~ /^$format$/) { + } elsif (ref $format ne 'ARRAY' and not $new =~ /\A(?:$format)\z/) { push @$errors, [ 'user', 'syntax_errors',