Merge pull request #6838 from thundernest/fix_ContentTransferEncoding

Don't parse `Content-Transfer-Encoding` as header containing named parameters
This commit is contained in:
cketti 2023-04-21 17:55:52 +02:00 committed by GitHub
commit 9f9062e02e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,7 +7,6 @@ import java.io.OutputStream;
import com.fsck.k9.mail.internet.BinaryTempFileBody;
import com.fsck.k9.mail.internet.BinaryTempFileMessageBody;
import com.fsck.k9.mail.internet.MimeUtility;
import org.apache.commons.io.IOUtils;
import org.apache.james.mime4j.util.MimeUtil;
@ -16,10 +15,6 @@ public class DefaultBodyFactory implements BodyFactory {
public Body createBody(String contentTransferEncoding, String contentType, InputStream inputStream)
throws IOException {
if (contentTransferEncoding != null) {
contentTransferEncoding = MimeUtility.getHeaderParameter(contentTransferEncoding, null);
}
final BinaryTempFileBody tempBody;
if (MimeUtil.isMessage(contentType)) {
tempBody = new BinaryTempFileMessageBody(contentTransferEncoding);