Fix URI encoding on register/login, also fix database escape bug
This commit is contained in:
parent
c7aac027dd
commit
b9e465b714
6 changed files with 40 additions and 26 deletions
|
|
@ -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);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue