?
avatar PhilETaylor
PhilETaylor
7 Oct 2020

Steps to reproduce the issue

Joomla 4 with sample blog content installed
Enable com_csp with settings:

Screenshot 2020-10-07 at 13 12 07

Browse the frontend of the site a bit
Login to the frontend and edit an article
Browse the admin console of the site a bit

Return to com_csp - this gives us 9 reports - publish them all (because a user doesnt understand what hes doing and just wants it to work)

Screenshot 2020-10-07 at 13 14 06

Click Options
Set mode to Automatic
Set Report-Only to no
Save

Now I cannot even run JS on the page :)

Content-Security-Policy: default-src 'self' 'self' data; frame-ancestors 'self' ; default-src 'self' ; script-src 'self' 'nonce-YjE3NWEyMmYzYTM3YjNjZjYzNmZmYWNmYTQyNTA2ZmRlOGJjOTAxMDVkNDJmMTFhYmRmNWVjZDdlN2MwZTllNzA0YThmYjdjODUwM2EwYTRlZjVlY2ZkZTE0NDRkMDNjZDg0NWVlZjI3M2QzZmFkYjNjYjYyOTc1NWU0MzQxNDk='; style-src 'self' 'nonce-YjE3NWEyMmYzYTM3YjNjZjYzNmZmYWNmYTQyNTA2ZmRlOGJjOTAxMDVkNDJmMTFhYmRmNWVjZDdlN2MwZTllNzA0YThmYjdjODUwM2EwYTRlZjVlY2ZkZTE0NDRkMDNjZDg0NWVlZjI3M2QzZmFkYjNjYjYyOTc1NWU0MzQxNDk='

Screenshot 2020-10-07 at 13 18 12

avatar PhilETaylor PhilETaylor - open - 7 Oct 2020
avatar joomla-cms-bot joomla-cms-bot - change - 7 Oct 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 7 Oct 2020
avatar zero-24
zero-24 - comment - 7 Oct 2020

Hmm that generated header looks strange can you show me the list of aproved reports from com_csp?

avatar PhilETaylor PhilETaylor - change - 7 Oct 2020
The description was changed
avatar PhilETaylor PhilETaylor - edited - 7 Oct 2020
avatar PhilETaylor PhilETaylor - change - 7 Oct 2020
The description was changed
avatar PhilETaylor PhilETaylor - edited - 7 Oct 2020
avatar PhilETaylor
PhilETaylor - comment - 7 Oct 2020

I have updated the issue... I screwed it good and proper this time haha

Im guessing you are not meant to just publish enable all the reports :-) but thinking like a user, that is what people will do.

There is also no way now to "disable" the header because the admin console cannot work with no JS

Maybe a plain HTML rescue button would be a good idea..

Anyway, Im not sure this is a valid issue that needs fixing. More a "I broke it by acting like a user"....

avatar PhilETaylor
PhilETaylor - comment - 7 Oct 2020

Actually I can get to options to disable it, but I cannot click the circles to unpublished reports until I disable the header.

avatar PhilETaylor PhilETaylor - change - 7 Oct 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-10-07 12:21:30
Closed_By PhilETaylor
avatar PhilETaylor PhilETaylor - close - 7 Oct 2020
avatar zero-24
zero-24 - comment - 7 Oct 2020

Actually I can get to options to disable it, but I cannot click the circles to unpublished reports until I disable the header.

By Default the backend should not be affected by the headers as the default is site only. Have you changed that option?

Please re open here so we can keep track of the issue. That component is far from perfekt and your feedback and tests are very good so we can see and discuss how and where to improve.

avatar zero-24
zero-24 - comment - 8 Oct 2020

@PhilETaylor can we please follow up on this one and re open here sonwe can start identifing and fixing the problems reported here?

avatar PhilETaylor
PhilETaylor - comment - 8 Oct 2020

I was waiting until I had time to revisit and replicate and redocument this issue which I still have not had time to do. Reopening now anyway.

avatar PhilETaylor PhilETaylor - change - 8 Oct 2020
Status Closed New
Closed_Date 2020-10-07 12:21:30
Closed_By PhilETaylor
avatar PhilETaylor PhilETaylor - reopen - 8 Oct 2020
avatar zero-24
zero-24 - comment - 8 Oct 2020

Great. Thanks and no need to hurry i just wanted it reopen and you on board that it does not get lost. The replicate and redocument steps would be great so we can also see what settings you had etc. But again no need to hurry on this. ?

avatar PhilETaylor
PhilETaylor - comment - 8 Oct 2020

Maybe its just me not understanding what "detect" mode is meant to be doing.

Im assuming that if I enabled "detect" mode and go and browse around the site, the site will ping the reporting URL with every asset that would have been blocked, and which needs to be whitelisted in the CSP - and then I can just visit the rules and publish them all to get a decent CSP ... that's what a user would do Im pretty sure.

Here is a video: https://www.youtube.com/watch?v=RTi_ahlFbjc

Also note towards the end of the video where the SVG for the green "Configuration saved" message should be is not there.

Screenshot 2020-10-08 at 21 56 17

avatar zero-24
zero-24 - comment - 17 Oct 2020

Please check: #31132 and thanks for that video it helped a lot to understand and see the issue with Safari vs Chrome :D

avatar zero-24
zero-24 - comment - 17 Oct 2020

Im assuming that if I enabled "detect" mode and go and browse around the site, the site will ping the reporting URL with every asset that would have been blocked, and which needs to be whitelisted in the CSP - and then I can just visit the rules and publish them all to get a decent CSP ... that's what a user would do Im pretty sure.

Just to confirm yes that is the intended process. But in this case the directive passed to the reporter was not vanilla but also included more stuff than intended so that caused some issues.

avatar zero-24 zero-24 - change - 17 Oct 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-10-17 13:52:22
Closed_By zero-24
avatar zero-24
zero-24 - comment - 17 Oct 2020

I have now also added a special handling for data reports to that PR too. So for now i would like to close here in reference to the PR mention. Thanks!

avatar zero-24 zero-24 - close - 17 Oct 2020

Add a Comment

Login with GitHub to post a comment