Uploaded image for project: 'SR for Jira - Development'
  1. SR for Jira - Development
  2. SRJIRA-2965

Don't include file extensions in MIME-encoding of attachment filenames

    Details

    • Type: Change
    • Status: To Do
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: 5.4.12
    • Fix Version/s: None
    • Component/s: Listeners
    • Labels:
      None
    • Critical Points:
      0.6

      Description

      When ScriptRunner constructs a custom email with attachments, it encodes the attachment filenames in ASCII if they contain any non-ASCII characters. Among other things, this encoding involves appending a special string to the end of the filename, effectively altering the file's extension. If the email app receiving the attachment does not decode the filename again then it will probably fail to recognise the extension, even if it would have recognised the original extension. The contents of the attachment itself will of course be unchanged, but it will be less convenient to open if the file type has not been auto-recognised.

      One solution would be to strip the extension off before encoding and then re-append it afterwards. This relies on the extension being pure ASCII (which most are) and will probably not be compatible with email apps that attempt to decode encoded filenames.

        Attachments

          Activity

            People

            Assignee:
            tbatagiannis Thanos Batagiannis
            Reporter:
            jchoules Joanna Choules
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: