Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jar archives are not displayed in speedgrader #2190

Open
jlge opened this issue Sep 10, 2024 · 2 comments
Open

Jar archives are not displayed in speedgrader #2190

jlge opened this issue Sep 10, 2024 · 2 comments

Comments

@jlge
Copy link
Contributor

jlge commented Sep 10, 2024

Zip directory contains .java files and a folder with a 'MANIFEST.MF' file, but fails to display in speedgrader view.

Current behavior
Binary file not displayed for entire zip
image

Expected behavior
Should be able to view the zip directory structure with all of it's files

@jlge jlge changed the title Zip containing binary files causes zip to fail to render entirely Autolab does not display jar archives in speedgrader Sep 11, 2024
@jlge jlge changed the title Autolab does not display jar archives in speedgrader Jar archives are not displayed in speedgrader Sep 11, 2024
@20wildmanj
Copy link
Contributor

More context:

While it may be the case that the viewer can't deal with binary files inside archives, this particular situation is caused by changes in the unix file command, used by the Archive.get_archive_type and Archive.archive? methods

libmagic now has many additional detectors for file formats that reuse the zip container format, including APKs, openoffice, epub, ios, and yes, files created with the jar tool. Files which match those detectors will not be shown as zip files or get the application/zip mimetype.
See https://github.com/file/file/blob/master/magic/Magdir/archive#L1798-L2142 for the rules in question.

In particular, jar files will be labeled with the application/java-archive mimetype. IF autolab wants to support jar archives, this mimetype will need to be an alias for application/zip

@jlge
Copy link
Contributor Author

jlge commented Nov 1, 2024

Tar archives with the "pax" format are also unable to be read (only "ustar" format as of right now).
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants