diff --git a/lang/en b/lang/en index 228458057..1a26a6b67 100644 --- a/lang/en +++ b/lang/en @@ -319,6 +319,7 @@ progress_incache=Found $1 in cache .. readparse_cdheader=Missing Content-Disposition header readparse_enc=Expecting form-data encoding, but got normal encoding readparse_max=Data exceeded maximum size of $1 bytes +readparse_nofile=Missing filename for upload password_expired=Your password has expired, and a new one must be chosen. password_temp=You must select a new password to replace your temporary login. diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index 63a743efa..910100c45 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -855,10 +855,11 @@ while(1) { my $data = ""; my $dfile; my $fh; - if ($direct_dir && $file) { + if ($direct_dir) { # Save directly to disk $file =~ /([^\\\/]+)$/; my $filename = $1; + $filename || &error($text{'readparse_nofile'}); my $uppath = "$direct_dir/$filename"; open($fh, ">", $uppath) || next; # Return file name, no data