mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-15 04:04:10 +01:00
Quote original list when a translated list is ill-formed.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
85f58d6906
commit
78af118b9a
@ -1440,10 +1440,10 @@ sub find_file($)
|
|||||||
"$config_path[0]$filename";
|
"$config_path[0]$filename";
|
||||||
}
|
}
|
||||||
|
|
||||||
sub split_list( $$ ) {
|
sub split_list( $$;$ ) {
|
||||||
my ($list, $type ) = @_;
|
my ($list, $type, $origlist ) = @_;
|
||||||
|
|
||||||
fatal_error "Invalid $type list ($list)" if $list =~ /^,|,$|,,|!,|,!$/;
|
fatal_error( "Invalid $type list (" . ( $origlist ? $origlist : $list ) . ')' ) if $list =~ /^,|,$|,,|!,|,!$/;
|
||||||
|
|
||||||
split /,/, $list;
|
split /,/, $list;
|
||||||
}
|
}
|
||||||
|
@ -300,9 +300,11 @@ fatal_error "Invalid SRC/DST ($srcdst)" if supplied $srcdst &
|
|||||||
my $chainref = get_action_chain;
|
my $chainref = get_action_chain;
|
||||||
my ( $level, $tag ) = get_action_logging;
|
my ( $level, $tag ) = get_action_logging;
|
||||||
my $target = require_audit ( $action , $audit );
|
my $target = require_audit ( $action , $audit );
|
||||||
|
my $origcountries = $countries;
|
||||||
|
|
||||||
$countries =~ s/\|/,/g;
|
$countries =~ s/\|/,/g;
|
||||||
my @countries = split_list $countries, 'cc';
|
|
||||||
|
my @countries = split_list $countries, 'cc', $origcountries;
|
||||||
|
|
||||||
for ( @countries ) {
|
for ( @countries ) {
|
||||||
fatal_error "Unknown ISO 3661 Country Code ($_)" unless $isocodes{$_};
|
fatal_error "Unknown ISO 3661 Country Code ($_)" unless $isocodes{$_};
|
||||||
|
Loading…
Reference in New Issue
Block a user