? ? ? Pending

User tests: Successful: Unsuccessful:

avatar nielsnuebel
nielsnuebel
7 Feb 2020

This PR solves the problem of an undefined variable $cspValue copied from the method setCspHeader to compileAutomaticCspHeaderRules.

avatar nielsnuebel nielsnuebel - open - 7 Feb 2020
avatar nielsnuebel nielsnuebel - change - 7 Feb 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 7 Feb 2020
Category Front End Plugins
avatar nielsnuebel nielsnuebel - change - 7 Feb 2020
Title
fix change undefined $cspValue to $row in method compileAutomaticCspH…
[4.0]fix change undefined $cspValue to $row in method compileAutomaticCspH…
avatar nielsnuebel nielsnuebel - edited - 7 Feb 2020
avatar jwaisner
jwaisner - comment - 7 Feb 2020

@nielsnuebel Please provide test instructions for your PR.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27835.

avatar jwaisner jwaisner - change - 9 Feb 2020
Labels Added: ?
avatar richard67
richard67 - comment - 11 Feb 2020

@nielsnuebel Could you check @wilsonge 's comment above and implement the suggested change, i.e. change $row->directive to $cspHeaderValue->directive in lines 412 and 418? This should then also solve @zero-24 ' review comment.
P.S.: And provide some testing instructions please.

avatar nielsnuebel
nielsnuebel - comment - 12 Feb 2020

testing instructions:

  1. go to backend -> system -> Content Security Policy -> Options -> enabled CSP, Mode = Detect
  2. go to site and CSP will be created
  3. go back to backend -> system -> Content Security Policy -> Options -> enabled CSP, Mode = Automatic
    image
  4. go to -> system -> Content Security Policy -> change an item status to published for Example
    image
  5. Set in Global Configuration error_reporting to development and now you will get some errors on frotend and one in the Backend depends #26505
avatar Quy
Quy - comment - 13 Feb 2020

Here is var_dump $cspHeaderCollection:

array(3) {
  ["default-src"]=>
  string(64) " 'unsafe-inline' 'unsafe-inline' 'unsafe-inline' 'unsafe-inline'"
  ["script-src"]=>
  string(0) ""
  ["style-src"]=>
  string(0) ""
}

and var_dump $cspHeaderkey:

string(11) "default-src"

Thus, one can assume $cspValue->directive should be $cspHeaderkey

avatar Quy
Quy - comment - 11 Mar 2020

Closing in favor of #28318

avatar Quy Quy - close - 11 Mar 2020
avatar Quy Quy - change - 11 Mar 2020
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2020-03-11 19:46:13
Closed_By Quy
Labels Added: ? ?

Add a Comment

Login with GitHub to post a comment