Service desk emails from one particular email client (Titan) fail to process. This happens both when opening an issue and when adding a comment. The sender gets "OneDev is unable to process your message" with:
Cannot invoke "String.indexOf(String)" because "etext" is null
Server log:
ERROR i.o.server.mail.DefaultMailManager Error processing message
java.lang.NullPointerException: Cannot invoke "String.indexOf(String)" because "etext" is null
at javax.mail.internet.MimeUtility.decodeText(MimeUtility.java:606)
at io.onedev.server.mail.DefaultMailManager.fillAttachments(DefaultMailManager.java:1110)
at io.onedev.server.mail.DefaultMailManager.fillAttachments(DefaultMailManager.java:1134)
at io.onedev.server.mail.DefaultMailManager.parseBody(DefaultMailManager.java:1032)
at io.onedev.server.mail.DefaultMailManager.addComment(DefaultMailManager.java:656)
at io.onedev.server.mail.DefaultMailManager.handleMessage(DefaultMailManager.java:480)
...
The same trace occurs via openIssue(DefaultMailManager.java:703) for new issues.
It looks like fillAttachments passes the part's filename to MimeUtility.decodeText without a null check. The failing emails contain a MIME part treated as an attachment or inline item (likely an inline image) with no filename. Emails from other clients process normally.
Expected: parts without a filename are either skipped or given a generated name, and the email is processed.
I'm not sure if it's related to other "similar issues" offered. First noticed it on 12.0.1.
Service desk emails from one particular email client (Titan) fail to process. This happens both when opening an issue and when adding a comment. The sender gets "OneDev is unable to process your message" with:
Server log:
The same trace occurs via
openIssue(DefaultMailManager.java:703)for new issues.It looks like
fillAttachmentspasses the part's filename toMimeUtility.decodeTextwithout a null check. The failing emails contain a MIME part treated as an attachment or inline item (likely an inline image) with no filename. Emails from other clients process normally.Expected: parts without a filename are either skipped or given a generated name, and the email is processed.
I'm not sure if it's related to other "similar issues" offered. First noticed it on 12.0.1.