mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-23 22:58:52 +01:00
Don't allow shell meta characters in interface names
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
d5aaa66e0b
commit
b80d4c2320
@ -1119,7 +1119,7 @@ sub process_interface( $$ ) {
|
||||
|
||||
my ($interface, $port, $extra) = split /:/ , $originalinterface, 3;
|
||||
|
||||
fatal_error "Invalid interface name ($interface)" if $interface =~ /[()\[\]]\*\?/;
|
||||
fatal_error "Invalid interface name ($interface)" if $interface =~ /[()\[\]\*\?%]/;
|
||||
|
||||
fatal_error "Invalid INTERFACE ($originalinterface)" if ! $interface || defined $extra;
|
||||
|
||||
@ -1318,7 +1318,7 @@ sub process_interface( $$ ) {
|
||||
fatal_error "The '$option' option requires a value" unless defined $value;
|
||||
|
||||
if ( $option eq 'physical' ) {
|
||||
fatal_error "Invalid physical interface name ($interface)" if $interface =~ /[()\[\]]\*\?%/;
|
||||
fatal_error "Invalid interface name ($interface)" if $interface =~ /[()\[\]\*\?%]/;
|
||||
fatal_error "Virtual interfaces ($value) are not supported" if $value =~ /:\d+$/;
|
||||
|
||||
fatal_error "Duplicate physical interface name ($value)" if ( $interfaces{$value} && ! $port );
|
||||
|
Loading…
Reference in New Issue
Block a user