mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-04 08:08:16 +02:00
Check charset of fragmented subject
This commit is contained in:
@@ -2880,6 +2880,11 @@ public class MessageHelper {
|
||||
try {
|
||||
byte[] b1 = decodeWord(p1.text, p1.encoding, p1.charset);
|
||||
byte[] b2 = decodeWord(p2.text, p2.encoding, p2.charset);
|
||||
if (CharsetHelper.isValid(b1, p1.charset) && CharsetHelper.isValid(b2, p2.charset)) {
|
||||
p++;
|
||||
continue;
|
||||
}
|
||||
|
||||
byte[] b = new byte[b1.length + b2.length];
|
||||
System.arraycopy(b1, 0, b, 0, b1.length);
|
||||
System.arraycopy(b2, 0, b, b1.length, b2.length);
|
||||
|
||||
Reference in New Issue
Block a user