#1009215 munpack does not properly decode split attachment filenames [patch]

Package:
mpack
Source:
mpack
Description:
tools for encoding/decoding MIME messages
Submitter:
Henrik Holst
Date:
2024-06-10 14:30:05 UTC
Severity:
normal
#1009215#5
Date:
2022-04-08 22:52:27 UTC
From:
To:
The munpack utility which is part of the mpack package does not handle
attachment filenames that are split into parts. The attached patch fixes this.

I have tested the patched version against a variety of split filenames formats,

some mail senders add a ; to the end of each part, some don't. And it
have worked
fine for all the mails that I've tested it against so far.

I have attached the patch as a file since Gmail is known to mess up
inlined patches.


Regards,

  Henrik Holst

#1009215#10
Date:
2024-06-10 14:26:08 UTC
From:
To:
Hi,

We’ve the same problem with munpack so I was happy to see your patch. I downloaded the sources with

dget  http://deb.debian.org/debian/pool/main/m/mpack/mpack_1.6-18.dsc

applied your patch to the sources and a build it without problems.

I tested it with a message which has this multiline filename and it worked good except, that the filename has an additional X at the place where a new line starts.

In exact, the mime Header says

Content-Disposition: attachment;
        filename*0=Report_source01_destcustomer_report_data_2024.06.09_08.30.xl;
        filename*1=s

and the patched munpack saves the file as

Report_source01_destcustomer_report_data_2024.06.09_08.30.xlXs (application/vnd.ms-excel)

I’m not quite sure where this X comes from and sadly, my C knowledge isn’t good enough. Do you’ve any idea what is causing this X?

Thanks! a lot
Chris

[https://www.emetriq.com/wp-content/uploads/2024/01/E-Mail.jpg]<https://www.emetriq.com/>
[https://www.emetriq.com/wp-content/uploads/2022/07/logo.png]<https://www.emetriq.com/> trusted success<https://www.emetriq.com/>
emetriq GmbH (Deutsche Telekom Gruppe) • Vorsetzen 35 • 20459 Hamburg
Sitz der Gesellschaft: Bonn • Handelsregister: AG Bonn, HRB 20117 • Geschäftsführer: Stephan Jäckel

Datenschutz ist emetriq sehr wichtig. Weitere Informationen finden Sie in unseren Datenschutzhinweisen unter www.emetriq.com/datenschutz.<https://www.emetriq.com/datenschutz>

This e-mail is confidential and is intended for the addressee(s) only. If you are not the named addressee you may not use it, copy it or disclose it to any other person. If you received this message in error please notify the sender immediately.


Karriere

Komm an Bord und werde Teil eines starken Teams und bewirb dich jetzt!
zu den Jobs<https://www.emetriq.com/karriere/>


Mitgliedschaft

Wir sind Mitglied im Bundesverband Digitale Wirtschaft.
mehr erfahren<https://www.bvdw.org/>


Folge uns

emetriq in den sozialen Netzwerken

LinkedIn<https://www.linkedin.com/company/emetriq-gmbh> Xing<https://www.xing.com/pages/emetriqgmbh> Facebook<https://www.facebook.com/emetriq> Instagram<https://www.instagram.com/emetriq_/>