Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-4280

CSP: nonce attribute on script tags will be ignored on ajax updates

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.3-next-M1
    • None
    • None

    Description

      simple CSP case:

      • add a static nonce via phaselistener/servlerfilter in the headers
      • add the the static nonce to a script tag

      this works fine for a GET request or non-ajax POST but our ajax engine just ignores the nonce attribute on scripts and following error occurs in the browser:

      Content Security Policy: Die Einstellungen der Seite haben das Laden einer Ressource auf inline blockiert ("script-src").

      There will probably other tickets in the future but thats the first basic case which must be supported.
      There are of course other problems like onclick handlers in the DOM or the eval node in the partial-response.

      Similar to: https://github.com/jquery/jquery/issues/3541

      Attachments

        Activity

          People

            werpu Werner Punz
            tandraschko Thomas Andraschko
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: