From: unknown Date: Mon, 11 Feb 2008 22:14:27 +0000 (-0600) Subject: Import version as of 2008-02-11 for upload-ftp-v1.1.pl X-Git-Tag: 20200730__import~43 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b99016ffddf426aae7089b6bbdfca6a6a752b793;p=gatekeeper.git Import version as of 2008-02-11 for upload-ftp-v1.1.pl --- diff --git a/upload-ftp-v1.1.pl b/upload-ftp-v1.1.pl index 8063c16..9b708ea 100755 --- a/upload-ftp-v1.1.pl +++ b/upload-ftp-v1.1.pl @@ -424,7 +424,15 @@ sub scan_incoming { || &fatal("rename $incoming_dir/$base to $incoming_tmp/$base failed: $!",0); delete $possible{$base}; - } + } elsif ((-f $directive) && ((-s $directive) >= 50*1024)) { + rename ("$incoming_dir/$directive", "$incoming_dir/.$directive"); + ftp_syslog('info', "($log_style) $directive larger than 50KB"); + &fatal("The directive file $directive is larger than 50KB. This can not be correct, ignoring upload.",0); + } elsif ((-f $sig) && ((-s $sig) >= 50*1024)) { + rename ("$incoming_dir/$sig", "$incoming_dir/.$sig"); + ftp_syslog('info', "($log_style) $directive or $sig larger than 50KB"); + &fatal("The signature file $sig is larger than 50KB. This can not be correct, ignoring upload.",0); + } } return @ret;