]> git.p6c8.net - devedit.git/blobdiff - modules/Command.pm
- Check if the CGI module was able to create a valid handle for a file upload
[devedit.git] / modules / Command.pm
index 0b39533af424012dd0f4ac1bb23d8f580cac65c4..96dbf5273a42285c454eab6b30db2db362b440cc 100644 (file)
@@ -6,7 +6,7 @@ package Command;
 # Execute Dev-Editor's commands
 #
 # Author:        Patrick Canterino <patrick@patshaping.de>
 # Execute Dev-Editor's commands
 #
 # Author:        Patrick Canterino <patrick@patshaping.de>
-# Last modified: 2004-12-28
+# Last modified: 2005-01-01
 #
 
 use strict;
 #
 
 use strict;
@@ -500,6 +500,8 @@ sub exec_upload($$)
   my $ascii     = $cgi->param('ascii');
   my $handle    = $cgi->upload('uploaded_file');
 
   my $ascii     = $cgi->param('ascii');
   my $handle    = $cgi->upload('uploaded_file');
 
+  return error($config->{'errors'}->{'invalid_upload'},$virtual) unless($handle);
+
   # Read transferred file and write it to disk
 
   read($handle, my $data, -s $handle);
   # Read transferred file and write it to disk
 
   read($handle, my $data, -s $handle);

patrick-canterino.de