Issue collector form is broken

XMLWordPrintable

    • 7.12
    • Severity 3 - Minor

      Issue Summary

      When embedding JIRA issue collector code into an html or Javascript the issue collector Provide Feedback button is not displayed.
      The form can't be loaded.

      Environment

      • JIRA 7.12.3

      Steps to Reproduce

      1. Install JIRA 7.12.3
      2. Create a poject
      3. From the project setting configure an issue collector, copy the code to embed the issue collector form into a test html.
      4. Follow the JIRA html example and embed the code
      5. Load the html page

      Expected Results

      Issue collector Provide Feedback button appears and when clicked the form is loaded and we can submit an issue.

      Actual Results

      The page is broken and both Firefox and Chrome will block the page loading from completion with a console error similar to below:

      Refused to execute script from 'http://localhost:17123/jira7123/rest/collectors/1.0/configuration/trigger/5a369a02?os_authType=none&callback=trigger_5a369a02' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
      

      Notes

      • Most modern browsers will do strict checks on Mime Types and there is no way to stop them from doing that due to security reasons.
      • in JIRA 7.12.3, The call to the REST Endpoint /rest/collectors/1.0/configuration/trigger/d60737ee uses the wrong Content-Type header, the expected type is:
        Content-Type: application/x-javascript;charset=UTF-8
        

        While the code sends a wrong content type:

        Content-Type: text/html;charset=UTF-8
        

        Which causes the browser Mime type check to fail.

      • Both JIRA 7.6.10 and 7.13.0 doesn't show this problem.

      Workaround

      Upgrade to JIRA 7.13.0, the issue is not observed there.

        1. Screenshot_20181203_143202.png
          264 kB
          Sherif Abdelfattah
        2. Screenshot_20181203_144234.png
          326 kB
          Sherif Abdelfattah
        3. Screenshot_20181203_151551.png
          310 kB
          Sherif Abdelfattah

              Assignee:
              Unassigned
              Reporter:
              Sherif Abdelfattah (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: