Univention Bugzilla – Bug 46710
(4.3) Files uploaded by IE11 are not distributed to teacher/students
Last modified: 2018-04-06 22:02:24 CEST
+++ This bug was initially created as a clone of Bug #46709 +++ A customer reported that files uploaded by IE11 are not distributed to teacher/students. The management-console-module-schoolexam.log show the following lines: 16.03.18 15:54:43.211 MODULE ( INFO ) : Detected filename '\\\\dcgsmitte\\netlogon\\univention-netlogon-logon.cmd' as '\\\\dcgsmitte\\netlogon\\univention-netlogon-logon.cmd' 16.03.18 15:54:43.211 MODULE ( INFO ) : Received file '/var/tmp/univention-management-console-frontend/152121208311437-709BXj7sn', saving it to '/tmp/ucsschool-exam-upload-NSfB4U/\\\\dcgsmitte\\netlogon\\un ivention-netlogon-logon.cmd' A test showed that IE11 sends the windows path as "filename" during upload. Another short test resulted in the following log entry: 20.03.18 13:03:48.757 MODULE ( INFO ) : Detected filename 'C:\\Windows\\Installer\\{2690E265-61BB-4655-89E6-A26A54CBCBD5}\\foobar.exe' as ......... Chrome and Firefox send only the filename (here "univention-netlogon-logon.cmd" resp. "foobar.exe"). This also affects the UMC distribution module.
It turned out that the Internet Explorer transfers a UNC path or a Windows path to the UMC when uploading the files in the MIME header. The UMC and the UMC modules (distribution and exam) handle this correctly at first and create a temporary file which, for example /tmp/ucsschool-distribution-upload-1O4qSl/ with a file name as specified in the MIME header (→ /tmp/ucsschool-distribution-upload-1O4qSl/\\\\dcgsmitte\netlogon\foobar.txt or /tmp/ucsschool-distribution-upload-1O4qSl/C:\mydir\foobar.txt). The file has now arrived correctly on the school server and is saved with the UNC path as file name. What is now causing problems is the fact that Internet Explorer then tells the UMC module that it has uploaded the file "foobar.txt" (not as UNC path) when creating a distribution project/class work. This means that the file referenced in the request is not found again and therefore is not distributed to the users. Firefox and Chrome correctly send only the file name in the MIME header. The upload function of both modules has now been adapted to use the characters after the last backslash as file name, provided that at least one backslash is included. Fallback: if there is no character after the last backslash, the backslashes in the file name of the MIME header are replaced with underscores and leading/trailing underscores are removed. In my tests, files could now be successfully uploaded with Chrome and IE11 to the two UMC modules. Two simple test scripts have been added to ucs-test-ucsschool to check if the files uploaded with/without UNC path are correctly *only* stored with file names in the temporary directory: 18_distribute_filename_problems 101_exam_mode_filename_problems Package: ucs-school-umc-exam Version: 8.0.1-4A~4.3.0.201803221143 Package: ucs-school-umc-distribution Version: 16.0.0-2A~4.3.0.201803221143 Package: ucs-test-ucsschool Version: 5.0.2-24A~4.3.0.201803221142 0c1cc096 Bug #46710: add changelog entry 52ffe400 Bug #46710, #46719: Merge branch 'sschwardt/46710/43/file_upload' into 4.3 d53fc291 Bug #46710: add advisories 699fcd92 Bug #46710: add changelog entries bd5b8714 Bug #46710: add ucs-test to check if prolematic MIME filenames are fixed correctly b9a34bf0 Bug #46710: strip filename if it contains backslashes
Ok What I tested: File upload through Firefox -> OK File upload through IE -> OK File upload through IE with site in intranet zone (the broken part) -> OK Tests -> OK YAML -> OK -> Verified
UCS@school 4.3 v2 has been released. https://docs.software-univention.de/changelog-ucsschool-4.3v2-de.html If this error occurs again, please clone this bug.