james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Quynh Nguyen (JIRA)" <j...@apache.org>
Subject [jira] [Created] (MAILBOX-290) Error handling for Attachment parser, not throw when unknown content-dispositio
Date Mon, 13 Mar 2017 03:01:04 GMT
Quynh Nguyen created MAILBOX-290:
------------------------------------

             Summary: Error handling for Attachment parser, not throw when unknown content-dispositio
                 Key: MAILBOX-290
                 URL: https://issues.apache.org/jira/browse/MAILBOX-290
             Project: James Mailbox
          Issue Type: Bug
          Components: store
    Affects Versions: master
            Reporter: Quynh Nguyen
             Fix For: master



```
java.lang.IllegalStateException: 'cid' is mandatory for inline attachments
    at org.apache.james.mailbox.model.MessageAttachment$Builder.build(MessageAttachment.java:79)
    at org.apache.james.mailbox.store.mail.model.impl.MessageParser.retrieveAttachment(MessageParser.java:106)
    at org.apache.james.mailbox.store.mail.model.impl.MessageParser.listAttachments(MessageParser.java:84)
    at org.apache.james.mailbox.store.mail.model.impl.MessageParser.retrieveAttachments(MessageParser.java:67)
    at org.apache.james.mailbox.store.StoreMessageManager.extractAttachments(StoreMessageManager.java:438)
    at org.apache.james.mailbox.store.StoreMessageManager.appendMessage(StoreMessageManager.java:394)
```

And exception is caught here :

```
        try {
            return messageParser.retrieveAttachments(contentIn);
        } catch (Exception e) {
            LOG.warn("Error while parsing mail's attachments: " + e.getMessage(), e);
            return ImmutableList.of();
        }
```

Extreme error handling : No attachment will be created for JMAP if one attachement is not
well formatted

If an attachment is failing (IE inline without CID), and the message have an other valid attachment,
then the MessageAttachmentParser should have one attachment.

Write JMAP integration test for this too




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message