add comment about missing protocol handling in MessageCryptoStructureDetector

This commit is contained in:
Vincent Breitmoser 2017-10-04 02:52:25 +02:00
parent 6ececc378a
commit 688169077d

View file

@ -228,6 +228,7 @@ public class MessageCryptoStructureDetector {
String protocolParameter = MimeUtility.getHeaderParameter(part.getContentType(), PROTOCOL_PARAMETER);
// for partially downloaded messages the protocol parameter isn't yet available, so we'll just assume it's ok
boolean dataUnavailable = protocolParameter == null && mimeMultipart.getBodyPart(0).getBody() == null;
boolean protocolMatches = isSameMimeType(protocolParameter, mimeMultipart.getBodyPart(1).getMimeType());
return dataUnavailable || protocolMatches;
@ -247,6 +248,7 @@ public class MessageCryptoStructureDetector {
String protocolParameter = MimeUtility.getHeaderParameter(part.getContentType(), PROTOCOL_PARAMETER);
// for partially downloaded messages the protocol parameter isn't yet available, so we'll just assume it's ok
boolean dataUnavailable = protocolParameter == null && mimeMultipart.getBodyPart(1).getBody() == null;
boolean protocolMatches = isSameMimeType(protocolParameter, mimeMultipart.getBodyPart(0).getMimeType());
return dataUnavailable || protocolMatches;