foens/hpop

Decode base64 bug

Opened this issue · 1 comments

String
=?utf-8?B?0JTQuNGB0LvQvtC60LDRhtC40Y8g0YHQu9C10LTRg9GO0YnQ?= =?utf-8?B?uNGFINCyINCw0LTRgNC10YEg0JLQodCaINC60L7QvdGC0LXQudC90LXR?= =?utf-8?B?gNC+0LIu?=

must be decoded as

=?utf-8?B?0JTQuNGB0LvQvtC60LDRhtC40Y8g0YHQu9C10LTRg9GO0YnQuNGFINCyINCw0LTRgNC10YEg0JLQodCaINC60L7QvdGC0LXQudC90LXRgNC+0LIu

Not separated.
EncodedWord.cs (48)

Technically, the way that OpenPOP handles decoding this series of encoded-word tokens is correct according to the spec, but unfortunately many mail clients incorrectly break apart long encoded-words such that they need to be decoded after their payloads are combined.

For anyone suffering from this problem, I highly recommend my own libraries: MimeKit and MailKit.

Hope that helps.