Fix salt in client
This commit is contained in:
parent
89d668df76
commit
6099b39329
|
@ -65,6 +65,11 @@ function on_sumbit()
|
||||||
domain = parseURI.parseUri(form.ownerDocument.baseURI);
|
domain = parseURI.parseUri(form.ownerDocument.baseURI);
|
||||||
domain = domain["host"];
|
domain = domain["host"];
|
||||||
|
|
||||||
|
salt = parseURI.parseUri(prefSet.prefs["account_url"]);
|
||||||
|
salt = salt["host"] + salt["path"];
|
||||||
|
|
||||||
|
console.log("salt " + salt);
|
||||||
|
|
||||||
// Get all <input type="text">
|
// Get all <input type="text">
|
||||||
for (i=0; i<fields.length; i++)
|
for (i=0; i<fields.length; i++)
|
||||||
{
|
{
|
||||||
|
@ -89,7 +94,7 @@ function on_sumbit()
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
mkey = password.substring(2);
|
mkey = password.substring(2);
|
||||||
mkey = pkdbf2.pkdbf2(mkey, prefSet.prefs["account_url"], 1000, 256/8);
|
mkey = pkdbf2.pkdbf2(mkey, salt, 1000, 256/8);
|
||||||
|
|
||||||
user = null;
|
user = null;
|
||||||
// Subset of common user field
|
// Subset of common user field
|
||||||
|
|
|
@ -85,7 +85,6 @@ function derive_mkey(user, mkey_target)
|
||||||
}
|
}
|
||||||
|
|
||||||
url = url_domain(document.URL) + "/" + user;
|
url = url_domain(document.URL) + "/" + user;
|
||||||
|
|
||||||
mkey = a2hex(pkdbf2(mkey, url, 1000, 256/8));
|
mkey = a2hex(pkdbf2(mkey, url, 1000, 256/8));
|
||||||
mkey_target.value = mkey;
|
mkey_target.value = mkey;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user