From 7bdce1bc9719dbfc0b3110cef986dd80dc009dde Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Thu, 29 Nov 2012 08:29:20 -0800 Subject: [PATCH] Disallow superfluous leading zeros in action parameter numbers. Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Config.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index c32b4b5a3..9c19f68e6 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -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};