Fix URI encoding on register/login, also fix database escape bug

This commit is contained in:
calzoneman 2013-07-27 10:11:31 -04:00
parent c7aac027dd
commit b9e465b714
6 changed files with 40 additions and 26 deletions

View file

@ -66,7 +66,9 @@
window.addEventListener("message", respond, false);
$("#login").click(function() {
$.getJSON(WEB_URL+"/api/json/login?name="+$("#username").val()+"&pw="+$("#pw").val()+"&callback=?", function(data) {
var u = encodeURIComponent($("#username").val());
var p = encodeURIComponent($("#pw").val());
$.getJSON(WEB_URL+"/api/json/login?name="+u+"&pw="+p+"&callback=?", function(data) {
data.uname = $("#username").val();
source.postMessage("cytube-login:"+JSON.stringify(data), document.location);
});