? Pending

User tests: Successful: Unsuccessful:

avatar zero-24
zero-24
16 May 2018

Pull Request for the next step to support CSP by default.

Summary of Changes

Based on the great work by @wilsonge with this changes we append to any inline script that is using the jdocument api the nonce generated on any page load. With this we can whitelist the js we use / injecte via jdocument but block any other JS that is not expected to run.

Testing Instructions

  • apply this patch
  • enable the plg_system_httpheaders
  • check the page source of any page that includes inline js (like the com_fields edit page)
  • notice that there is a nonce="RANDOMSTRING" in there.

Expected result

nonce set and used for inline scripts

Actual result

no nonce support at all

Documentation Changes Required

Like earlier you are now required to use the document api to inject your js or at least set the nonce yourself.

70f56f9 16 May 2018 avatar zero-24 cs
avatar zero-24 zero-24 - open - 16 May 2018
avatar zero-24 zero-24 - change - 16 May 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 16 May 2018
Category Libraries Front End Plugins
avatar zero-24 zero-24 - change - 16 May 2018
Labels Added: ?
avatar wilsonge wilsonge - change - 16 May 2018
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-05-16 14:52:31
Closed_By wilsonge
avatar wilsonge wilsonge - close - 16 May 2018
avatar wilsonge wilsonge - merge - 16 May 2018

Add a Comment

Login with GitHub to post a comment