Details
-
Bug
-
Resolution: Timed out
-
Low
-
None
-
6.2
-
6.02
-
2
-
Severity 3 - Minor
-
Description
When JIRA receives a malformed email message via the Incoming mail server with the charset specified incorrectly like the following, JIRA creates a ticket and throws a NPE
Steps to Reproduce
Have the JIRA Incoming mail server receive a malformed email message with the charset specified incorrectly like the following
--CES.Boundary.DACA587499938898 content-type: text/plain;charset=ISO-8859-1 To view the content of this message, please use an HTML enabled mail client. --CES.Boundary.DACA587499938898 content-type: text/html;=ISO-8859-1
Expected Results
JIRA should verify the message is malformed and do the action specified in the Bulk field of the Mail Handler configuration.
Actual Results
JIRA creates a ticket from that email, throws the NPE mentioned below and doesn't remove the message from the mail server, causing it to do the same behaviour every time the mail handler service runs
2014-02-18 10:24:44,274 ERROR [Mail handler] QuartzScheduler_Worker-2 ServiceRunner Mail handler From Email Service 2 Mail handler From Email Service 2[10041]: Exception: charsetName java.lang.NullPointerException: charsetName at java.io.InputStreamReader.<init>(Unknown Source) at com.sun.mail.handlers.text_plain.getContent(text_plain.java:107) at javax.activation.DataSourceDataContentHandler.getContent(Unknown Source) at javax.activation.DataHandler.getContent(Unknown Source) at javax.mail.internet.MimeBodyPart.getContent(MimeBodyPart.java:637) at com.atlassian.jira.plugins.mail.handlers.AbstractMessageHandler.handleMultipart(AbstractMessageHandler.java:654) at com.atlassian.jira.plugins.mail.handlers.AbstractMessageHandler.createAttachmentsForMessage(AbstractMessageHandler.java:627) at com.atlassian.jira.plugins.mail.handlers.CreateIssueHandler.handleMessage(CreateIssueHandler.java:274) at com.atlassian.jira.plugins.mail.handlers.CreateOrCommentHandler.handleMessage(CreateOrCommentHandler.java:133) at com.atlassian.jira.service.services.mail.MailFetcherService$1.process(MailFetcherService.java:400) at com.atlassian.jira.service.services.mail.MailFetcherService$MessageProviderImpl.getAndProcessMail(MailFetcherService.java:293) at com.atlassian.jira.service.services.mail.MailFetcherService.runImpl(MailFetcherService.java:388) at com.atlassian.jira.service.services.file.AbstractMessageHandlingService.run(AbstractMessageHandlingService.java:257) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:61) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:48) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)