mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-23 16:13:18 +01:00
Insist that RATE and CEIL expressions consist of numbers, parens, and arithmetic operators before trying to compile them
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8447 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
eefef500de
commit
a23c9d4044
@ -402,6 +402,7 @@ sub convert_rate( $$ ) {
|
||||
if ( $rate =~ /\bfull\b/ ) {
|
||||
$rate =~ s/\bfull\b/$full/g;
|
||||
progress_message " Compiling $_[1]";
|
||||
fatal_error "Invalid Rate ($_[1])" if $rate =~ m{[^0-9*/+()-]};
|
||||
$rate = eval "int( $rate )";
|
||||
fatal_error "Invalid Rate ($_[1])" unless defined $rate;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user