mirror of https://github.com/M66B/FairEmail.git
Fix NUL characters in decrypted messages
This commit is contained in:
parent
56a98260f7
commit
08c37785ad
|
@ -3507,7 +3507,8 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||||
|
|
||||||
// Write decrypted body
|
// Write decrypted body
|
||||||
EntityMessage m = db.message().getMessage(id);
|
EntityMessage m = db.message().getMessage(id);
|
||||||
Helper.writeText(m.getFile(context), decrypted.toString().replace("\0", ""));
|
Helper.writeText(m.getFile(context),
|
||||||
|
decrypted.toString().replace("\0", ""));
|
||||||
|
|
||||||
db.message().setMessageStored(id, new Date().getTime());
|
db.message().setMessageStored(id, new Date().getTime());
|
||||||
|
|
||||||
|
@ -3530,7 +3531,10 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||||
|
|
||||||
// Write decrypted body
|
// Write decrypted body
|
||||||
EntityMessage m = db.message().getMessage(id);
|
EntityMessage m = db.message().getMessage(id);
|
||||||
Helper.writeText(m.getFile(context), parts.getHtml(context));
|
String html = parts.getHtml(context);
|
||||||
|
if (html != null)
|
||||||
|
html = html.replace("\0", "");
|
||||||
|
Helper.writeText(m.getFile(context), html);
|
||||||
|
|
||||||
// Remove previously decrypted attachments
|
// Remove previously decrypted attachments
|
||||||
for (EntityAttachment local : attachments)
|
for (EntityAttachment local : attachments)
|
||||||
|
|
Loading…
Reference in New Issue