forked from extern/shorewall_code
Disallow superfluous leading zeros in action parameter numbers.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
e1524763ad
commit
7bdce1bc97
@ -2481,7 +2481,7 @@ sub expand_variables( \$ ) {
|
||||
my $val;
|
||||
|
||||
if ( $var =~ /^\d+$/ ) {
|
||||
fatal_error "Undefined parameter (\$$var)" unless defined $actparms[$var];
|
||||
fatal_error "Undefined parameter (\$$var)" if ( ! defined $actparms[$var] ) || ( length( $var ) > 0 && $var =~ /^0/ );
|
||||
$val = $var ? $actparms[$var] : $actparms[0]->{name};
|
||||
} elsif ( exists $params{$var} ) {
|
||||
$val = $params{$var};
|
||||
|
Loading…
Reference in New Issue
Block a user