Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in 'ecwid-sdk' for Enhanced Security apps when getting the payload. #2

Open
alexmicic opened this issue Jun 28, 2022 · 1 comment

Comments

@alexmicic
Copy link

In your JS lib any version, but for example https://d35z3p2poghz10.cloudfront.net/ecwid-sdk/js/1.2.9/ecwid-app.js, you have a bug for getting the payload.

function getPayloadFromParam() {
    var query = window.location.search.substring(1);
    var vars = query.split('&');
    for (var i = 0; i < vars.length; i++) {
        var pair = vars[i].split('=');
        if (decodeURIComponent(pair[0]) === 'devpayload') {
            return decodePayload(decodeURIComponent(pair[1]));
        }
    }
    return null;
}

where you are searching only for devpayload which is wrong because the request actually has payload query param.

@JinnOfEcwid
Copy link

Hi,
This is Jinn from Ecwid by Lightspeed.
Thank you for your message! I have reported about the issue to our dev team for further investigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants