Sanity check the SOA serial

https://github.com/virtualmin/virtualmin-gpl/issues/1004
This commit is contained in:
Jamie Cameron
2025-02-07 15:02:49 -08:00
parent 4190dcca7f
commit 5b245c8aef
2 changed files with 2 additions and 0 deletions

View File

@ -141,6 +141,7 @@ master_emip=Invalid master IP '$1'
master_esetup=BIND module is not set up
master_eview=View $1 was not found
master_eserial=Serial number must be a string of digits
master_eserial2=Serial number must be less than 2^31
master_apply=Apply Changes
master_applymsg2=Click this button to apply changes for this zone only. This will only work if changes have been applied for the entire server at least once since the zone was created.
master_defttl=Default time-to-live for records

View File

@ -56,6 +56,7 @@ if ($config{'updserial_on'}) {
}
else {
$in{'serial'} =~ /^\d+$/ || &error($text{'master_eserial'});
$in{'serial'} < 2**31 || &error($text{'master_eserial2'});
$serial = $in{'serial'};
}
my $vals = "$in{'master'} $in{'email'} (\n".