vibe.d icon indicating copy to clipboard operation
vibe.d copied to clipboard

vibe.inet.message: parseRFC5322Header() bug

Open Lord-Evil opened this issue 4 years ago • 1 comments

Method parseRFC5322Header() breaks it's tees against gmail headers: saying "Header is missing ':'." After bit of debugging I've found that the reason for it is that google has no newline before email's body image

Lord-Evil avatar May 29 '21 17:05 Lord-Evil

RFC 5322, Section 2.1 explicitly mentions that the header and the body is separated by an empty line:

The body is simply a sequence of characters that follows the header section and is separated from the header section by an empty line (i.e., a line with nothing preceding the CRLF).

So if gmail really sends out something like that, it seems to be a rather serious bug on their part. You could, accidentally or on purpose, inject headers through the message body if there is no unambiguous separator between the two.

s-ludwig avatar Jun 01 '21 15:06 s-ludwig