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

Issue creation via email failed if email subject exceeds 255 characters

    XMLWordPrintable

Details

    Description

      NOTE: This bug report is for JIRA Service Desk Server. Using JIRA Service Desk Cloud? See the corresponding bug report.

      Problem Description

      The SD incoming mail stops processing further.

      Diagnostic

      On the logs with incoming mail debug enabled, it seems to stuck on a particular mail.

      2015-03-20 11:25:09,133 atlassian-scheduler-quartz1.clustered_Worker-2 DEBUG ServiceRunner     [mail.incoming.jepp.processor] Starts processing mail item [id: 3063] ...
      2015-03-20 11:25:09,133 atlassian-scheduler-quartz1.clustered_Worker-2 DEBUG ServiceRunner     [mail.incoming.jepp.processor] Checking if mail item [id: 3063] is a mail loop ...
      2015-03-20 11:25:09,138 atlassian-scheduler-quartz1.clustered_Worker-2 DEBUG ServiceRunner     [mail.incoming.jepp.processor] Detected mail item [id: 3063] as a mail loop
      

      The example above shows ID: 3063

      Verify which ID being stuck:

      jira=# select "ID" from "AO_2C4E5C_MAILITEMCHUNK" where "MAIL_ITEM_ID" = 3063;
        ID
      ------
       3123
      (1 row)
      

      example above returns 3123 by placing "MAIL_ITEM_ID" = 3063

      Then check the content by base64 decode the result obtained:

      select "MIME_MSG_CHUNK" from "AO_2C4E5C_MAILITEMCHUNK" where "ID" = 3123;
      

      Explanation

      Subject field that carries more than 255 characters will cause the SQL injection to return error therefore hitting into a halt.

      Workaround

      If you wish to recover the email content before deletion, follow the KB below:

      Then you can proceed with deleting the affected ID that stuck, refer to the steps below:

      1. Backup the database
      2. Delete following the command below:
        delete from "AO_2C4E5C_MAILITEMCHUNK" where "MAIL_ITEM_ID" = <id from above>;
        delete from "AO_2C4E5C_MAILITEM" where "ID" = <id from above>;
        

        Replace the ID with the ID found at the Diagnostic area above 3063 for this example

      Attachments

        Issue Links

          Activity

            People

              dnguyen@atlassian.com Duy Nguyen
              rgee Richie Gee (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Backbone Issue Sync