Details
-
Bug
-
Resolution: Fixed
-
Low
-
3.6.0, 3.7.0, 3.9.0, 3.10.0, 3.11.0, 3.12.0, 3.13.0, 3.14.0, 3.15.0
-
None
-
6
-
Severity 3 - Minor
-
11
-
Description
Summary
When using the Service Desk Mail Handler, if the customer replies to a notification and includes an attachment with a filename shorter than 3 characters, the email is discarded and no comment is added to the ticket.
Steps to reproduce
- Configure an SMTP server in ⚙ > System > Outgoing Mail
- Create a Service Desk project
- Configure a SD Mail Handler in Project Settings > Email Requests
- Log into the Customer Portal as a customer, and create a Request
- Log into the customer's mailbox and wait for the "Issue Created" Customer Notification to be received
- Reply to this customer notification and include a file that has less than 2 characters in the filename. For example: 0
Expected behavior
A comment is added to the Service Desk ticket and the file is attached to it.
Observed behavior
- The email is discarded by Service Desk and no comment is added to the ticket
- The customer does not receive any notification about this failure
- The following FAILURE is shown in the UI in the SD logs:
- The following exception is found in the incoming email logs:
2018-09-17 14:33:31,419 ERROR [] Caesium-1-2 anonymous Exception when MailHandlerWorker handles message: java.lang.RuntimeException: Unexpected error while running action as user 'julienreyjiratestcustomer2@gmail.com' at com.atlassian.pocketknife.internal.util.runner.AuthenticationContextUtilImpl.runAs(AuthenticationContextUtilImpl.java:60) [?:?] at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailServiceImpl.inEmailContext(IncomingEmailServiceImpl.java:473) [?:?] at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailServiceImpl.lambda$doCreateNewOrCommentOnIssueWithMailChannel$15(IncomingEmailServiceImpl.java:172) [?:?] at io.atlassian.fugue.Either$Right.fold(Either.java:620) [fugue-4.5.0.jar:?] at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailServiceImpl.doCreateNewOrCommentOnIssueWithMailChannel(IncomingEmailServiceImpl.java:170) [?:?] at com.atlassian.servicedesk.internal.feature.emailchannel.IncomingEmailServiceImpl.lambda$createNewOrCommentOnIssueWithMailChannel$6(IncomingEmailServiceImpl.java:145) [?:?] ... Caused by: java.lang.IllegalArgumentException: Prefix string too short at java.io.File.createTempFile(File.java:2001) [?:1.8.0_121] at java.io.File.createTempFile(File.java:2070) [?:1.8.0_121] at com.atlassian.servicedesk.internal.comment.InternalServiceDeskCommentServiceScala.com$atlassian$servicedesk$internal$comment$InternalServiceDeskCommentServiceScala$$createTempFile(InternalServiceDeskCommentServiceScala.scala:521) [?:?] at com.atlassian.servicedesk.internal.comment.InternalServiceDeskCommentServiceScala$$anonfun$14.apply(InternalServiceDeskCommentServiceScala.scala:502) [?:?]
Workaround
There is no ideal workaround for this issue besides ensuring that customers never attach files that have less than 3 characters when replying to notifications. This can be a problem when customers use mail clients which convert images into thumbnails, since these thumbnails often have names of only 1 character.
Notes
This issuse only occurs with the Service Desk Mail Handler, and only when replying to a notification to comment in a ticket. It does not occur when creating an issue via email.
Also, this issue does not occur with the JIRA Core Mail Handler which is configured in ⚙ > System > Incoming Mail (the bug was fixed for this Mail Handler in JRASERVER-1229).
Attachments
Issue Links
- is related to
-
JRASERVER-1229 adding attachment crashes if filename too short?
- Closed
- mentioned in
-
Page Loading...
- was cloned as
-
JSMDC-2886 Loading...