mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 06:03:28 +00:00
Check that uploaded file has a filename
This commit is contained in:
1
lang/en
1
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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user