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 = domain["host"];
|
||||
|
||||
salt = parseURI.parseUri(prefSet.prefs["account_url"]);
|
||||
salt = salt["host"] + salt["path"];
|
||||
|
||||
console.log("salt " + salt);
|
||||
|
||||
// Get all <input type="text">
|
||||
for (i=0; i<fields.length; i++)
|
||||
{
|
||||
|
@ -89,7 +94,7 @@ function on_sumbit()
|
|||
continue;
|
||||
|
||||
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;
|
||||
// Subset of common user field
|
||||
|
|
|
@ -85,7 +85,6 @@ function derive_mkey(user, mkey_target)
|
|||
}
|
||||
|
||||
url = url_domain(document.URL) + "/" + user;
|
||||
|
||||
mkey = a2hex(pkdbf2(mkey, url, 1000, 256/8));
|
||||
mkey_target.value = mkey;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user