1
0
mirror of https://gitlab.com/shorewall/code.git synced 2025-08-19 21:24:11 +02:00

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

@@ -4206,10 +4206,10 @@ sub do_length( $ ) {
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 ) {
fatal_error "First length must be < second length" unless $1 < $2;
if ( supplied $2 ) {
fatal_error "First length must be < second length" unless $1 < $3;
}
"-m length --length $length ";