? ? Pending

User tests: Successful: Unsuccessful:

avatar zero-24
zero-24
31 May 2022

Pull Request for Issue #37461

Summary of Changes

Improve nonce and strict-dynamic handling within the http header plugin:

  • once the nonce setting is enabled always add the nonce to the header and dont require an specific tag + bc handling.
  • make sure strict-dynamic is the first setting set in the header.

Testing Instructions

First test

  • Enable the nonce setting within the plugin
  • check the http header
  • confirm that the nonce is not added to the header
  • add {nonce} to script-src
  • confirm that the nonce is now at the header
  • apply the patch
  • confirm the nonce is still at the header
  • remove the {nonce} tag
  • confirm the nonce is still at the header

Seccond test

  • Enable the strict-dynamic setting
  • set some own script-src settings and end that line with ";"
  • confirm that the strict dynamic setting is than showed outside of the script-src
  • apply this patch
  • confirm that this issue is resolved

Actual result BEFORE applying this Pull Request

  • Nonce only added to the header once the {nonce} tag is aviable
  • In some cases the strict-dynamic setting is generated outside of the script-src

Expected result AFTER applying this Pull Request

  • Nonce is added to the header once the setting is enabled
  • The {nonce} tag will still be removed to keep B/C
  • The strict-dynamic option is now always at the first option once enabled

Documentation Changes Required

n.a. (as the {nonce} was never documented)

avatar zero-24 zero-24 - open - 31 May 2022
avatar zero-24 zero-24 - change - 31 May 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 31 May 2022
Category Front End Plugins
avatar zero-24 zero-24 - change - 31 May 2022
The description was changed
avatar zero-24 zero-24 - edited - 31 May 2022
avatar gopitzohlsen
gopitzohlsen - comment - 2 Jun 2022

With strict dynamic enabled, I get strict dynamic inside the script-src directive and outside the script-src directive.
With strict-dynamic disabled, I get no strict-dynamic inside and outside the script-src directive.

avatar richard67
richard67 - comment - 13 Jun 2022

With strict dynamic enabled, I get strict dynamic inside the script-src directive and outside the script-src directive. With strict-dynamic disabled, I get no strict-dynamic inside and outside the script-src directive.

@gopitzohlsen Does that mean you have successfully tested this pull request? If so, could you go to the issue tracker here https://issues.joomla.org/tracker/joomla-cms/37940 and use the blue "Test this" button at the top left corner? Just use the button, then select your test result and then submit. Thanks in advance.

avatar gopitzohlsen gopitzohlsen - test_item - 13 Jun 2022 - Tested successfully
avatar gopitzohlsen
gopitzohlsen - comment - 13 Jun 2022

I have tested this item successfully on 899007c


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

avatar laoneo laoneo - test_item - 16 Jun 2022 - Tested successfully
avatar laoneo
laoneo - comment - 16 Jun 2022

I have tested this item successfully on 899007c


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

avatar laoneo
laoneo - comment - 16 Jun 2022

But I think this change should go into 4.2.

avatar richard67
richard67 - comment - 16 Jun 2022

But I think this change should go into 4.2.

@laoneo If so, then this should also apply to PR #37942 .

avatar richard67 richard67 - change - 16 Jun 2022
Status Pending Ready to Commit
Labels Added: ?
avatar richard67
richard67 - comment - 16 Jun 2022

RTC


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

avatar bembelimen
bembelimen - comment - 18 Jun 2022

Yes agree, thanks for this changes, but I will rebase to 4.2.

avatar bembelimen bembelimen - change - 18 Jun 2022
Labels Added: ?
avatar richard67 richard67 - change - 18 Jun 2022
Title
[4.1] Improve nonce and strict-dynamic handling within the http header plugin
[4.2] Improve nonce and strict-dynamic handling within the http header plugin
avatar richard67 richard67 - edited - 18 Jun 2022
avatar roland-d roland-d - change - 18 Jun 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-06-18 13:57:08
Closed_By roland-d
Labels Added: ?
Removed: ?
avatar roland-d roland-d - close - 18 Jun 2022
avatar roland-d roland-d - merge - 18 Jun 2022
avatar roland-d
roland-d - comment - 18 Jun 2022

Thanks everybody

Add a Comment

Login with GitHub to post a comment