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 PLEASE NOTE: that all commits have been done with bug number 46710! Package: ucs-test-ucsschool Version: 4.0.4-71A~4.2.0.201803221256 Package: ucs-school-umc-exam Version: 7.0.4-20A~4.2.0.201803221254 Package: ucs-school-umc-distribution Version: 15.0.1-6A~4.2.0.201803221254 1b0fc078 Bug #46710: add changelog entry abed9a08 Bug #46710, #46709, #46719, #46720: Merge branch 'sschwardt/46710/42/file_upload' into 4.2 c3e2d9e7 Bug #46710: add advisories 15537293 Bug #46710: add changelog entries d4d04d61 Bug #46710: add ucs-test to check if prolematic MIME filenames are fixed correctly 7794816f Bug #46710: strip filename if it contains backslashes
Note: IE only sends the full path if the page is considered to be in the intranet zone. (Apparently for better compatibility with sites from the early nineties...) That's why I weren't able to reproduce this before.
Files with backslashes uploaded through linux now don't work. But the distribution of such files probably didn't work anyways? Feel free to move that into a separate bug
(In reply to Jürn Brodersen from comment #2) > IE only sends the full path if the page is considered to be in the intranet > zone. (Apparently for better compatibility with sites from the early > nineties...) Good catch. (In reply to Jürn Brodersen from comment #3) > Files with backslashes uploaded through linux now don't work. > But the distribution of such files probably didn't work anyways? > > Feel free to move that into a separate bug → Bug 46730
Ok What I tested: File upload through Chrome -> OK File upload through IE -> OK File upload through IE with site in intranet zone (the broken part) -> OK File distribution -> OK Tests -> OK YAML -> OK -> Verified
UCS@school 4.2 v8 has been released. https://docs.software-univention.de/changelog-ucsschool-4.2v8-de.html If this error occurs again, please clone this bug.