mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-22 10:41:23 +02:00
Up the INCLUDE depth limit to 20
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
6f6abfc8cd
commit
3be071ca3d
@ -562,7 +562,9 @@ our %helpers = ( amanda => UDP,
|
|||||||
sip => UDP,
|
sip => UDP,
|
||||||
snmp => UDP,
|
snmp => UDP,
|
||||||
tftp => UDP,
|
tftp => UDP,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
use constant { INCLUDE_LIMIT => 20 };
|
||||||
|
|
||||||
our %helpers_map;
|
our %helpers_map;
|
||||||
|
|
||||||
@ -3320,7 +3322,7 @@ sub copy1( $ ) {
|
|||||||
my @line = split / /;
|
my @line = split / /;
|
||||||
|
|
||||||
fatal_error "Invalid INCLUDE command" if @line != 2;
|
fatal_error "Invalid INCLUDE command" if @line != 2;
|
||||||
fatal_error "INCLUDEs nested too deeply" if @includestack >= 4;
|
fatal_error "INCLUDEs nested too deeply" if @includestack >= INCLUDE_LIMIT;
|
||||||
|
|
||||||
my $filename = find_file $line[1];
|
my $filename = find_file $line[1];
|
||||||
|
|
||||||
@ -3530,7 +3532,7 @@ sub read_a_line($);
|
|||||||
sub embedded_shell( $ ) {
|
sub embedded_shell( $ ) {
|
||||||
my $multiline = shift;
|
my $multiline = shift;
|
||||||
|
|
||||||
fatal_error "INCLUDEs nested too deeply" if @includestack >= 4;
|
fatal_error "INCLUDEs nested too deeply" if @includestack >= INCLUDE_LIMIT;
|
||||||
my ( $command, $linenumber ) = ( "/bin/sh -c '$currentline", $currentlinenumber );
|
my ( $command, $linenumber ) = ( "/bin/sh -c '$currentline", $currentlinenumber );
|
||||||
|
|
||||||
$directive_callback->( 'SHELL', $currentline ) if $directive_callback;
|
$directive_callback->( 'SHELL', $currentline ) if $directive_callback;
|
||||||
@ -3617,7 +3619,7 @@ sub embedded_perl( $ ) {
|
|||||||
$embedded--;
|
$embedded--;
|
||||||
|
|
||||||
if ( $perlscript ) {
|
if ( $perlscript ) {
|
||||||
fatal_error "INCLUDEs nested too deeply" if @includestack >= 4;
|
fatal_error "INCLUDEs nested too deeply" if @includestack >= INCLUDE_LIMIT;
|
||||||
|
|
||||||
assert( close $perlscript );
|
assert( close $perlscript );
|
||||||
|
|
||||||
@ -3971,7 +3973,7 @@ sub read_a_line($) {
|
|||||||
my @line = split ' ', $currentline;
|
my @line = split ' ', $currentline;
|
||||||
|
|
||||||
fatal_error "Invalid INCLUDE command" if @line != 2;
|
fatal_error "Invalid INCLUDE command" if @line != 2;
|
||||||
fatal_error "INCLUDEs/Scripts nested too deeply" if @includestack >= 4;
|
fatal_error "INCLUDEs/Scripts nested too deeply" if @includestack >= INCLUDE_LIMIT;
|
||||||
|
|
||||||
my $filename = find_file $line[1];
|
my $filename = find_file $line[1];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user