Correct LENGTH column validation

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-03-13 17:58:18 -07:00
parent 98f8edbde5
commit c1d0681e17

View File

@ -4206,10 +4206,10 @@ sub do_length( $ ) {
require_capability( 'LENGTH_MATCH' , 'A Non-empty LENGTH' , 's' ); require_capability( 'LENGTH_MATCH' , 'A Non-empty LENGTH' , 's' );
fatal_error "Invalid LENGTH ($length)" unless $length =~/^(\d+)(:(\d+))$/; fatal_error "Invalid LENGTH ($length)" unless $length =~/^(\d+)(:(\d+))?$/;
if ( supplied $3 ) { if ( supplied $2 ) {
fatal_error "First length must be < second length" unless $1 < $2; fatal_error "First length must be < second length" unless $1 < $3;
} }
"-m length --length $length "; "-m length --length $length ";