Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.7.0
-
None
Description
Content-Disposition: attachment;
filename*=utf-8''4%P001!.DOC;
filename="4%P001!.DOC"
Lead to:
java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - Error at index 0 in: \"P0\"
at java.base/java.net.URLDecoder.decode(Unknown Source)
at java.base/java.net.URLDecoder.decode(Unknown Source)
at org.apache.james.mime4j.util.MimeParameterMapping.decodeParameterValue(MimeParameterMapping.java:55)
at org.apache.james.mime4j.util.MimeParameterMapping.addParameter(MimeParameterMapping.java:39)
at org.apache.james.mime4j.field.ContentDispositionFieldLenientImpl.parse(ContentDispositionFieldLenientImpl.java:165)
at org.apache.james.mime4j.field.ContentDispositionFieldLenientImpl.getDispositionType(ContentDispositionFieldLenientImpl.java:72)
at org.apache.james.mime4j.message.MaximalBodyDescriptor.getContentDispositionType(MaximalBodyDescriptor.java:183)
at org.apache.james.mailbox.opensearch.json.MimePartParser.extractMimePartBodyDescription(MimePartParser.java:133)
at org.apache.james.mailbox.opensearch.json.MimePartParser.manageBodyExtraction(MimePartParser.java:120)
at org.apache.james.mailbox.opensearch.json.MimePartParser.processMimePart(MimePartParser.java:87)
at org.apache.james.mailbox.opensearch.json.MimePartParser.parse(MimePartParser.java:69)
at org.apache.james.mailbox.opensearch.json.IndexableMessage$Builder.instantiateIndexedMessage(IndexableMessage.java:111)
at org.apache.james.mailbox.opensearch.json.IndexableMessage$Builder.build(IndexableMessage.java:76)
at org.apache.james.mailbox.opensearch.json.MessageToOpenSearchJson.convertToJson(MessageToOpenSearchJson.java:74)
at org.apache.james.mailbox.opensearch.events.OpenSearchListeningMessageSearchIndex.generateIndexedJson(OpenSearchListeningMessageSearchIndex.java:175)
at org.apache.james.mailbox.opensearch.events.OpenSearchListeningMessageSearchIndex.add(OpenSearchListeningMessageSearchIndex.java:169)
at org.apache.mailbox.tools.indexer.ReIndexerPerformer.lambda$index$23(ReIndexerPerformer.java:318)
Impact: the following message cannot be indexed...
Manage the error of James side so the the message is partially indexed (better than nothing!)