Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-10922

Jira Service Management Mail Handler error "invalid byte sequence for encoding "UTF8": 0x00" prevents issue creation by email when Postgres database is used

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • 5.11.0
    • 4.13.0, 4.19.1
    • Email - Incoming
    • None

    Description

      Issue Summary

      When JIRA Service Management mail handler tries to insert in the database an email that contains the character 0x00 NUL, the issue will not be created and the following error is thrown:

      2021-10-20 14:15:28,664+0000 Caesium-1-4 ERROR server@smtp.domain.com     [c.a.j.bc.issue.DefaultIssueService] Error creating issue: 
      com.atlassian.jira.exception.CreateException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Issue][summary,Good news][watches,0][creator,JIRAUSER10000][created,2021-10-20 14:15:28.655][timespent,null][timeoriginalestimate,null][project,10001][description,| ...
      (ERROR: invalid byte sequence for encoding "UTF8": 0x00))
          at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssue(DefaultIssueManager.java:586)
          at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssue(DefaultIssueManager.java:487)
      [..]
      
      Caused by: com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Issue][summary,Good news][watches,0][creator,JIRAUSER10000][created,2021-10-20 14:15:28.655][timespent,null][timeoriginalestimate,null][project,10001][description,|...

      Steps to Reproduce

      1. Create a JIRA Service Management mail handler
      2. Send an email with the character NUL (0x00) as part of the subject

      Expected Results

      JIRA corrects the NUL character unsupported by Postgres and creates the issue successfully

      Actual Results

      JIRA fails to create the issue and the below exception is thrown in the atlassian-jira.log file:

      2021-10-20 14:15:28,664+0000 Caesium-1-4 ERROR server@smtp.domain.com     [c.a.j.bc.issue.DefaultIssueService] Error creating issue: 
      com.atlassian.jira.exception.CreateException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Issue][summary,Good news][watches,0][creator,JIRAUSER10000][created,2021-10-20 14:15:28.655][timespent,null][timeoriginalestimate,null][project,10001][description,| ...
      (ERROR: invalid byte sequence for encoding "UTF8": 0x00)) 

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

      Attachments

        Issue Links

          Activity

            People

              4efd9de64ab4 Mingyi Yang
              2b156221a02c Violeta Fulger
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Backbone Issue Sync