Skip to content

Tears apart multi-line content-type #6

@particleflux

Description

@particleflux

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions