MailScanner / v5

MailScanner v5
GNU General Public License v2.0
188 stars 60 forks source link

update Message.pm for correct 7z/xz/bz2 etc. decompression #666

Closed dneuhaeuser closed 1 year ago

dneuhaeuser commented 1 year ago

suggestion for issue #665

In ExplodePartAndArchives() I combined the checks for archives. So far, the first check already skipped further handling for archives which were not ZIP or RAR.

Do we really need the additional checks for magic bytes here? (PK../Rar!/MZ)

In Unpack7zip() I reworked the extraction of filenames and attributes inside the archives.

I think the problem with xz/bz2 (no date/time) was introduced with the support for filenames with spaces. The old version (still in the comments) did not have these problems.

My suggestion works with spaces in filename and ignores date/time.