buckaroo-it / Magento2

Repository containing the Magento2 plugin by Buckaroo
MIT License
28 stars 35 forks source link

Add CSP nonce to all Buckaroo templates #1016

Closed jissereitsma closed 1 month ago

allanmfx commented 3 months ago

Hi @jissereitsma, nice work, but there is a problem: not all Magento versions have the CspNonceProvider class, example, it's not present on Magento 2.4.6-p5 -> https://github.com/magento/magento2/blob/2.4.6-p5/app/code/Magento/Csp/Helper/CspNonceProvider.php but present on 2.4.6-p6 -> https://github.com/magento/magento2/blob/2.4.6-p6/app/code/Magento/Csp/Helper/CspNonceProvider.php.

So it's hard to merge something like that, it could break a lot of existing stores that are not updated.

jissereitsma commented 3 months ago

Sure thing. Perhaps something similar to https://github.com/yireo/Yireo_GoogleTagManager2/blob/master/Util/SecureHtmlRendererStub.php could be implemented.

jissereitsma commented 3 months ago

@vegimcarkaxhija Could you dive further into this?