? Pending

User tests: Successful: Unsuccessful:

avatar zero-24
zero-24
17 Oct 2020

Pull Request for Issue #30963 cc @PhilETaylor

Summary of Changes

This does a few things:

  • It fixes: #30963 by makeing sure our csp reporter endpoint catches wird browser behavior (like the one by Safari)
  • It makes sure that you can only pass valid directives in the reporter
  • It only allows valid directives configured in the backend
  • It make sure that "none-value" directives are handled corrrectly.
  • It makes sure the reporting endpoint can only be triggered when CSP is enabled & w are in detect mode
  • It makes sure only site and administrtator are valid values for the client setting
  • It makes sure every report is only added once by locking the table

Testing Instructions

First test

  • Setup a clean instance
  • apply this patch
  • go to com_csp and enable detect mode
  • run the site in detect mode and navigate around.
  • got to com_csp again and check the reports
  • enable all reports
  • set the csp mode to auto
  • check the frontend and make sure the header is set correctly

Seccond test

  • Set the com_csp mode to custom
  • setup some directives
  • make sure they land correctly in csp header

Actual result BEFORE applying this Pull Request

There was to less validation in the CSP reporter endpoint.

Expected result AFTER applying this Pull Request

There is now much more validation in the CSP Reporter as well as checking for different browser behavior.

Documentation Changes Required

None.

avatar zero-24 zero-24 - open - 17 Oct 2020
avatar zero-24 zero-24 - change - 17 Oct 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 17 Oct 2020
Category Administration com_csp Front End Plugins
a7043c3 17 Oct 2020 avatar zero-24 phpcs
avatar zero-24 zero-24 - change - 17 Oct 2020
Labels Added: ?
avatar wilsonge wilsonge - close - 26 Oct 2020
avatar wilsonge wilsonge - merge - 26 Oct 2020
avatar wilsonge wilsonge - change - 26 Oct 2020
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-10-26 23:53:44
Closed_By wilsonge
avatar wilsonge
wilsonge - comment - 26 Oct 2020

Merging this so it's into the beta for wider testing. Thanks!

avatar infograf768
infograf768 - comment - 21 Dec 2020

Please see
#31746

Add a Comment

Login with GitHub to post a comment