-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: 7.12.1, 8.8.1
-
Component/s: REST API
-
None
-
7.12
-
3
-
Severity 3 - Minor
Summary
Currently, if user tried to upload an attachment which contains UTF-8 based characters (Eg: "Schlüssel.txt") with REST API using tool like python library, the fill failed to be attached and following stack trace will be logged in Jira's log:
2019-02-22 12:41:57,886 https-jsse-nio-443-exec-86 WARN vicky 761x3023604x3 spa8tc 10.115.15.193 /rest/api/2/issue/TEST-17788/attachments [c.a.j.issue.managers.DefaultAttachmentManager] Cannot create attachment without a filename - inline content? See http://jira.atlassian.com/browse/JRA-10825 (file=attachment-3058042277748636332.tmp). 2019-02-22 12:41:57,887 https-jsse-nio-443-exec-86 ERROR vicky 761x3023604x3 spa8tc 10.115.15.193 /rest/api/2/issue/TEST-17788/attachments [c.a.j.r.v2.issue.IssueAttachmentsResource] Error saving attachment java.lang.NullPointerException
The problem happens because some tolls use the extended notation "filename*=<enc>''xxxx" notation which breaks the filename.
Environment
Jira 7.12.1, 7.13.1
Expected Results
Attachment attached to issue with UTF-8 character.
Actual Results
Attachment not attached to issue with UTF-8 character and following stack trace is logged in Jira's log:
2019-02-22 12:41:57,886 https-jsse-nio-443-exec-86 WARN vicky 761x3023604x3 spa8tc 10.115.15.193 /rest/api/2/issue/TEST-17788/attachments [c.a.j.issue.managers.DefaultAttachmentManager] Cannot create attachment without a filename - inline content? See http://jira.atlassian.com/browse/JRA-10825 (file=attachment-3058042277748636332.tmp). 2019-02-22 12:41:57,887 https-jsse-nio-443-exec-86 ERROR vicky 761x3023604x3 spa8tc 10.115.15.193 /rest/api/2/issue/TEST-17788/attachments [c.a.j.r.v2.issue.IssueAttachmentsResource] Error saving attachment java.lang.NullPointerException
Workaround
Attach attachment with CURL command.