Commit 27c88100 authored by Michael Tross's avatar Michael Tross

properly encode the redirect_uri parameter

parent 2604b01c
......@@ -345,10 +345,14 @@ var vdc_check_auth = function()
g_auth.dSUID = undefined;
g_auth.code = undefined;
};
$.getJSON("/json/property/vdcquery?query=setProperty(deviceId=" +
g_auth.dSUID + ")/(x-action-authcode=\"" +
g_auth.code + "\")",
callback).fail(vdc_request_failed);
var redirect_uri = encodeURIComponent(window.location.origin + window.location.pathname);
$.getJSON("/json/property/vdcquery?",
{
query: "setProperty(deviceId=" + g_auth.dSUID + ")/" +
"(x-action-authcode=\"" + g_auth.code + "\")" +
",(x-action-redirect_uri=\"" + redirect_uri + "\")"
},
callback).fail(vdc_request_failed);
return false;
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment