Skip to content

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

@alexmicic

Description

@alexmicic

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions