Make sure re-signing period is less than 30 days

https://github.com/webmin/webmin/issues/2550
This commit is contained in:
Jamie Cameron
2025-09-15 15:37:06 -07:00
parent 43d5355114
commit 1b38d806fc
3 changed files with 5 additions and 1 deletions

View File

@@ -1207,6 +1207,7 @@ dnssec_secs=seconds
dnssec_desc=Zones signed with DNSSEC typically have two keys - a zone key which must be re-generated and signed regularly, and a key signing key which remains constant. This page allows you to configure Webmin to perform this re-signing automatically.
dnssec_err=Failed to save DNSSEC key re-signing
dnssec_eperiod=Missing or invalid number of days between re-signs
dnssec_eperiod30=Number of days between re-signs must be less than 30
dnssectools_title=DNSSEC-Tools Automation
dt_conf_title=DNSSEC-Tools Automation

View File

@@ -16,6 +16,7 @@ require './bind8-lib.pl';
$access{'defaults'} || &error($text{'dnssec_ecannot'});
$in{'period'} =~ /^[1-9]\d*$/ || &error($text{'dnssec_eperiod'});
$in{'period'} < 30 || &error($text{'dnssec_eperiod30'});
# Create or delete the cron job
my $job = &get_dnssec_cron_job();

View File

@@ -48,8 +48,10 @@ $in{'dt_zsklife'} =~ /(\b[0-9]+\b)/ ||
&error($text{'dt_conf_ezsklife'});
$nv{'zsklife'} = $1;
&save_dnssectools_directive($conf, \%nv);
$in{'period'} =~ /^[1-9]\d*$/ || &error($text{'dnssec_eperiod'});
$in{'period'} < 30 || &error($text{'dnssec_eperiod30'});
&save_dnssectools_directive($conf, \%nv);
&lock_file($module_config_file);
$config{'dnssec_period'} = $in{'period'};