openequella / openEQUELLA

Core openEQUELLA sources
https://openequella.github.io/
Apache License 2.0
42 stars 44 forks source link

Scorm/IMS Packages containing special characters not detected as Package attachment type #1868

Closed mrblippy closed 4 years ago

mrblippy commented 4 years ago

Describe the bug When an zip file is uploaded using the attachment control, oEQ looks inside the zip file for an imsmanifest.xml file. That's how it determines if the zip is a SCORM or IMS package.

However, any Scorm or IMS packages which contain filenames with special characters (eg. é) will not get detected as a content package. It will fail silently behind the scenes, and just treat the attachment as a regular zip.

https://github.com/openequella/openEQUELLA/blob/a4c1501fadddb7f2ccdff9848bb5c801c02d219c/Source/Plugins/Core/com.equella.core/src/com/tle/core/services/impl/FileSystemServiceImpl.java#L965 is using code inside the java.util.zip package, which is throwing an IllegalArgumentException("MALFORMED") when it encounters a filename with a special character. It's using UTF8 encoding

To Reproduce Steps to reproduce the behavior:

  1. In a contribution wizard, upload this scorm package using an attachment control (don't use drag and drop) special character in this scorm package.zip
  2. oEQ will just treat it as a regular zip attachment, instead of informing you you have uploaded a package file.

Expected behavior Any valid scorm or ims packages uploaded into oEQ should be detected as a package file, and ask how you want the file to be treated. package upload

Platform:

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

edalex-ian commented 4 years ago

All done back in July - was just missing labels and update. Closing.