Giter VIP home page Giter VIP logo

Comments (4)

Buckaroo-Rene avatar Buckaroo-Rene commented on August 23, 2024 1

Hi everyone,

Sorry for the late reply, but Magento 2.4.7-p1 and PHP 8.3 are supported from version 1.49.0 and 1.49.1.

from magento2.

dlabsnl avatar dlabsnl commented on August 23, 2024

Im waiting for this also.

from magento2.

boldhedgehog avatar boldhedgehog commented on August 23, 2024

Please note, that inline scripts on the checkout will stop working if they are not rendered with the secure renderer.

More about this here: https://developer.adobe.com/commerce/php/development/security/content-security-policies/#whitelist-an-inline-script-or-style

Example: https://github.com/buckaroo-it/Magento2/blob/v1.48.0/view/frontend/templates/checkout/mrcash/pay.phtml#L16

<script>
    require(['buckaroo/mrcash/pay'], function (mrcashPay) {
        var transactionKey = "<?= /* @noEscape */ ($block->getTransactionKey()); ?>";

        mrcashPay.setTransactionKey(transactionKey);
        mrcashPay.showQrCode();
    });
    cancelPayment = function() {
        require(['buckaroo/mrcash/pay'], function (mrcashPay) {
            mrcashPay.cancelPayment();
        });
    }
</script>

This should be either put into a variable or wrapped into ob_start() like this:

<?php
$key = $block->getTransactionKey();
$script = <<<JS
    require(['buckaroo/payconiq/pay'], function (payconiqPay) {
        var transactionKey = "$key";

        payconiqPay.setTransactionKey(transactionKey);
        payconiqPay.showQrCode();
    });
    cancelPayment = function() {
        require(['buckaroo/payconiq/pay'], function (payconiqPay) {
            payconiqPay.cancelPayment();
        });
    }
JS;
?>
<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $script, false); ?>

This was recently backported from 2.4.7 to older versions with the latest security patch and is enabled by default. After upgrade to 2.4.5-p8 inline script added in a conventional unsafe way stopped to work.

from magento2.

larsmbm avatar larsmbm commented on August 23, 2024

Could you please provide an update on this ticket? We're experiencing the same problem and would be grateful for any news.

from magento2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.