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

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

      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

            [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

            Satej Mirpagar made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Waiting for Release [ 12075 ] New: Closed [ 6 ]
            Mingyi Yang made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 801489 ]
            Mingyi Yang made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 798164 ]
            Mingyi Yang made changes -
            Fix Version/s New: 5.11.0 [ 105890 ]
            Mingyi Yang made changes -
            Status Original: In Review [ 10051 ] New: Waiting for Release [ 12075 ]
            Mingyi Yang made changes -
            Status Original: In Progress [ 3 ] New: In Review [ 10051 ]
            Mingyi Yang made changes -
            Status Original: Gathering Impact [ 12072 ] New: In Progress [ 3 ]
            Mingyi Yang made changes -
            Assignee New: Mingyi Yang [ 4efd9de64ab4 ]
            Mingyi Yang made changes -
            Remote Link New: This issue links to "Service Desk Master › Installer from scratch generation for JSM (Service Desk Master) › JSDSERVER-10922-sanitize-unicode-0x00-for-postgres (server-syd-bamboo)" [ 796617 ]
            Mingyi Yang made changes -
            Remote Link New: This issue links to "Service Desk Master › Service Desk - MASTER - TPM - Server Environment › JSDSERVER-10922-sanitize-unicode-0x00-for-postgres (server-syd-bamboo)" [ 796616 ]

              4efd9de64ab4 Mingyi Yang
              2b156221a02c Violeta Fulger
              Affected customers:
              0 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: