Update documentation and fix javascript bug (substr not allowed)

This commit is contained in:
2013-10-10 18:29:08 +02:00
parent 5e7073fbdd
commit aad001bb25
2 changed files with 30 additions and 8 deletions

View File

@@ -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);