From fb3a69821012c13076d41d871507807eb3357cd7 Mon Sep 17 00:00:00 2001 From: Alexander Weinhold Date: Sat, 5 Aug 2017 18:58:58 +0200 Subject: [PATCH] don't swallow unknown encodings --- libUnreadMail.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libUnreadMail.go b/libUnreadMail.go index 6bbe2af..08a6670 100644 --- a/libUnreadMail.go +++ b/libUnreadMail.go @@ -75,6 +75,8 @@ func normalize(m []byte, encoding string) ([]byte, error) { s, err = ioutil.ReadAll(quotedprintable.NewReader(strings.NewReader(string(m)))) } else if encoding == "base64" { s, err = ioutil.ReadAll(base64.NewDecoder(base64.StdEncoding, strings.NewReader(string(m)))) + } else { + s = m } if err == io.ErrUnexpectedEOF { err = nil