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

Tears apart multi-line content-type #6

Open
particleflux opened this issue Aug 26, 2019 · 0 comments
Open

Tears apart multi-line content-type #6

particleflux opened this issue Aug 26, 2019 · 0 comments

Comments

@particleflux
Copy link

Content-Type headers spanning multiple lines, like the ones uses by PGP/MIME, get torn apart.

For example the following excerpt of an email (last lines of header + start of body):

MIME-Version: 1.0
Content-Type: multipart/encrypted;
 protocol="application/pgp-encrypted";
 boundary="xRmQHxB0D5FgqSvOWFFhW9uLSlHPBbY4w"

This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156)
--xRmQHxB0D5FgqSvOWFFhW9uLSlHPBbY4w
Content-Type: application/pgp-encrypted
Content-Description: PGP/MIME version identification

becomes this:

Subject: Fwd: Test
Content-Type: multipart/encrypted;
MIME-Version: 1.0

which then fails to be parsed correctly.

I guess the best solution would be to keep the existing headers and replace the relevant ones instead of re-writing them all

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

No branches or pull requests

1 participant