Update documentation and fix javascript bug (substr not allowed)
This commit is contained in:
@@ -124,9 +124,11 @@ function on_sumbit()
|
||||
// gPassRequest.addEventListener("progress", function(evt) { ; }, false);
|
||||
gPassRequest.addEventListener("load", function(evt) {
|
||||
r = this.responseText.split("\n");
|
||||
debug("resp " + r);
|
||||
if (r[0] != "<end>" && r[0].startsWith("pass="))
|
||||
{
|
||||
ciphered_password = r[0].susbtr(5);
|
||||
ciphered_password = r[0].split("=");
|
||||
ciphered_password = ciphered_password[1];
|
||||
debug("Ciphered password : " + ciphered_password);
|
||||
clear_password = aes.decryptLongString(hex2a(ciphered_password), aes.init(hex2a(mkey)));
|
||||
aes.finish();
|
||||
@@ -159,7 +161,8 @@ function on_sumbit()
|
||||
});
|
||||
|
||||
}, false);
|
||||
gPassRequest.open("POST", prefSet.prefs["account_url"], true);
|
||||
debug("connect to " + prefSet.prefs["account_url"]);
|
||||
gPassRequest.open("POST", prefSet.prefs["account_url"], false);
|
||||
gPassRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
|
||||
gPassRequest.send(keys);
|
||||
|
||||
|
Reference in New Issue
Block a user