Time to ban for can be negative, meaning forever https://sourceforge.net/p/webadmin/bugs/4431/

This commit is contained in:
Jamie Cameron
2014-06-11 15:12:29 -07:00
parent 3bdb10fc65
commit 42f2ce162f
2 changed files with 2 additions and 2 deletions

View File

@@ -76,7 +76,7 @@ else {
# Validate various counters
foreach my $f ("maxretry", "findtime", "bantime") {
$in{$f.'_def'} || $in{$f} =~ /^[1-9]\d*$/ ||
$in{$f.'_def'} || $in{$f} =~ /^\-?[1-9]\d*$/ ||
&error($text{'jail_e'.$f});
}

View File

@@ -15,7 +15,7 @@ $jail || &error($text{'jaildef_egone'});
# Validate inputs
foreach my $f ("maxretry", "findtime", "bantime") {
$in{$f.'_def'} || $in{$f} =~ /^[1-9]\d*$/ ||
$in{$f.'_def'} || $in{$f} =~ /^\-?[1-9]\d*$/ ||
&error($text{'jail_e'.$f});
}
$in{'destemail_def'} || $in{'destemail'} =~ /^\S+(\@\S+)?$/ ||