From 8213897ef1ecb5230ff0c88d7b99ed87f4063898 Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Wed, 24 Mar 2021 20:44:22 -0500 Subject: [PATCH] Add "no-op" command for testing uses This command is only recognized in test mode. --- upload-ftp-v1.2.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/upload-ftp-v1.2.pl b/upload-ftp-v1.2.pl index c27012c..65cdb7d 100755 --- a/upload-ftp-v1.2.pl +++ b/upload-ftp-v1.2.pl @@ -858,6 +858,9 @@ sub read_directive_file { $info{"replace"} = $1; #ok. } elsif ($tainted_cmd =~ /^comment:?$/i) { # case-insensitive, w or w/o the : # Comments are ok, we ignore them + } elsif (IN_TEST_MODE && $tainted_cmd =~ /^no-op:?$/i) { + # The testsuite uses a no-op command to validate directive processing. + $info{'no-op'} = {order => $cnt++}; } else { &fatal("Invalid directive line:\n\n $tainted_cmd $tainted_val",1,$directive_file_contents); } -- 2.25.1