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

unpairDevice.js not forcing pingid_username and pingid_deviceid to match in order to unpair. #1

Open
bsmckamey opened this issue Jun 17, 2016 · 0 comments

Comments

@bsmckamey
Copy link

I'm forcing a match on my end at the moment, but I figured I'd log this as a potential bug or feature. The API isn't forcing the username to match up with the device id getting passed allowing any user to unpair any device.

I customized the scripts into server side code, so here's how the function looks on my end.

exports.pingid_unpair_device = function(pingid_username, pingid_deviceid, callback) {

    var operationEndpoint = "unpairdevice/do";
    var payload = {
        "userName" : pingid_username,
        "deviceId" : (pingid_deviceid == null) ? null : parseInt(pingid_deviceid),
        "clientData" : null
    };

    pingid.send_pingid_request(operationEndpoint, payload, function(apiResponse) {
        callback(apiResponse);
    });
}
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

1 participant