Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-63277

Issue collector might throw a lot of JS exceptions when 3rd party cookies are disallowed

    XMLWordPrintable

Details

    Description

      Steps to reproduce:

      • disallow 3rd party cookies in Chrome
      • use issue collector on your local instance of JIRA (or for example on bitbucket.org)
      • observe js exceptions

       

      After all exceptions there's a flag: "We noticed that you have third-party cookies disabled in your browser, we need this enabled to correctly submit your information." however we should catch the following:

       

      Exception:

      Uncaught DOMException: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document.(…)

       

      Stack trace (from /* module-key = 'jira.webresources:util', location = '/includes/jira/data/SessionStorage.js' */)

      getItem (batch.js?locale=en-UK:1373)
      (anonymous function) (batch.js?locale=en-UK:1379) 
      (anonymous function) (batch.js?locale=en-UK:1379) 
      main (batch.js?locale=en-UK:19) 
      callDep (batch.js?locale=en-UK:19) 
      req (batch.js?locale=en-UK:19) 
      window.require (batch.js?locale=en-UK:22) 
      (anonymous function) (batch.js?locale=en-UK:1379) 
      
      

      Links:

      https://www.chromium.org/for-testers/bug-reporting-guidelines/uncaught-securityerror-failed-to-read-the-localstorage-property-from-window-access-is-denied-for-this-document

      http://stackoverflow.com/questions/24456891/iframe-in-chrome-error-uncaught-securityerror-failed-to-read-the-sessionstora

       

      Update:

      Chrome throws Security Exception for cross-origin iframes, therefore you can observe the bug on bitbucket.org or your local instance since the iframe source comes from jdog or JAC.

      `SessionStorage` is a dependency for `jira.webresources:util` which is inside super batch, which is loaded within iframe.

      I've checked the code and it wasn't changed for several years, so for sure the bug exists in JIRA 7.2.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mrzymski Maciej Rzymski
              Votes:
              5 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: