Commit c8294f18 authored by Hussein's avatar Hussein

P4A-885 Add charset null-check

parent f2ac9bda
......@@ -80,7 +80,7 @@ class PEpMessageBuilder {
String charset = MimeUtility.getHeaderParameter(mm.getContentType(), "charset");
if (!Charset.isSupported(charset)) {
if (charset == null || !Charset.isSupported(charset)) {
// failback when the header doesn't have charset parameter or it is invalid, defaults to UTF-8
// FIXME: charset, trate non text bod4y types like application/pgp-keys
charset = Charset.defaultCharset().name();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment