foens / hpop

OpenPOP.NET code repository
http://hpop.sourceforge.net/
204 stars 114 forks source link

Decode base64 bug #70

Open hardway777 opened 6 years ago

hardway777 commented 6 years ago

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)

jstedfast commented 5 years ago

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.