Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-6682

Improve JavaScriptContentHeaderItem and JavaScriptUtils to support nonce

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 8.5.0, 9.0.0-M2
    • 9.0.0-M4
    • wicket

    Description

      One of easy wins for content security policy would be a support of nonce for inline JavaScript header injections.

      https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src#Unsafe_inline_script

      Criteria

      • Set up some kind of request unique nonce provider
      • Make it possible for JavaScript header items to have provided nonce
      • Add provided nonce to the `Content-Security-Policy: script-src` header

      See in code:
      org.apache.wicket.core.util.string.JavaScriptUtils#writeOpenTag
      org.apache.wicket.markup.head.JavaScriptContentHeaderItem#render

      Attachments

        Issue Links

          Activity

            People

              svenmeier Sven Meier
              Kondratev Andrew Kondratev
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: