mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-19 05:38:31 +00:00
Fix spaces in mime encoded protected subjects
This commit is contained in:
parent
7133ffe990
commit
43b65d1de5
1 changed files with 3 additions and 1 deletions
|
@ -2498,8 +2498,10 @@ public class MessageHelper {
|
||||||
ContentType ct = new ContentType(part.getContentType());
|
ContentType ct = new ContentType(part.getContentType());
|
||||||
if ("v1".equals(ct.getParameter("protected-headers"))) {
|
if ("v1".equals(ct.getParameter("protected-headers"))) {
|
||||||
String[] subject = part.getHeader("subject");
|
String[] subject = part.getHeader("subject");
|
||||||
if (subject != null && subject.length != 0)
|
if (subject != null && subject.length != 0) {
|
||||||
|
subject[0] = subject[0].replaceAll("\\?=[\\r\\n\\t ]+=\\?", "\\?==\\?");
|
||||||
parts.protected_subject = decodeMime(subject[0]);
|
parts.protected_subject = decodeMime(subject[0]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
Log.e(ex);
|
Log.e(ex);
|
||||||
|
|
Loading…
Reference in a new issue