Fix opening tar.foo.N archives
ClosedPublic

Authored by elvisangelaccio on Apr 11 2016, 10:34 AM.

Details

Summary

Tar archives whose extension is something like tar.gz.1 will be opened by the
singlefile plugin. It seems wget can create this kind of filenames.

This patch extends the input validation we already do for tar archives, to
also cover this case.

(Bugfix meant for Applications/16.04 branch)

Test Plan

a test case is added in the mimetype tests.

Diff Detail

Repository
R36 Ark
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
elvisangelaccio retitled this revision from to Fix opening tar.foo.N archives Tar archives whose extension is something like `tar.gz.1` will be opened by the singlefile plugin. It seems wget can create this kind of filenames. This patch extends the input validation we already do for tar....
elvisangelaccio updated this object.
elvisangelaccio edited the test plan for this revision. (Show Details)
elvisangelaccio added a reviewer: rthomsen.
Restricted Application added a project: Ark. · View Herald TranscriptApr 11 2016, 10:34 AM
Restricted Application added a subscriber: kde-utils-devel. · View Herald Transcript
elvisangelaccio retitled this revision from Fix opening tar.foo.N archives Tar archives whose extension is something like `tar.gz.1` will be opened by the singlefile plugin. It seems wget can create this kind of filenames. This patch extends the input validation we already do for tar... to Fix opening tar.foo.N archives .Apr 11 2016, 10:36 AM
elvisangelaccio updated this object.
rthomsen accepted this revision.Apr 23 2016, 12:14 PM
rthomsen edited edge metadata.

works for me :)

kerfuffle/mimetypes.cpp
51 ↗(On Diff #3275)

Would you mind writing in the comment what is done here? It's really hard to follow...

This revision is now accepted and ready to land.Apr 23 2016, 12:14 PM
elvisangelaccio marked an inline comment as done.Apr 23 2016, 2:09 PM