Index: openacs-4/packages/file-storage/www/file-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/file-add.tcl,v diff -u -r1.28.2.3 -r1.28.2.4 --- openacs-4/packages/file-storage/www/file-add.tcl 7 Jun 2021 14:00:06 -0000 1.28.2.3 +++ openacs-4/packages/file-storage/www/file-add.tcl 29 Dec 2021 17:38:20 -0000 1.28.2.4 @@ -239,6 +239,14 @@ -collapse_spaces \ -tolower \ $upload_file] + # If the sanitized upload_file name turns out empty, the file + # name was only made of invalid characters and chances are + # something funny is happening. We complain. + if {[string length $upload_file] == 0} { + template::form::set_error file-add upload_file \ + [_ acs-tcl.lt_name_contains_invalid [list name [_ file-storage.Name]]] + break + } set existing_item_id [fs::get_item_id -name $upload_file -folder_id $folder_id]