gPass

gPass Commit Details

Date:2017-07-08 08:39:22 (1 year 11 months ago)
Author:Grégory Soutadé
Branch:master
Commit:65821a4e4771c81080b0b6060dcfe4e818d401dc
Parents: 0caa8a66e1da00a9772df6e1e8024e2190e3a636
Message:Index for new crypto scheme was badly computed in webextension

Changes:
Mchrome_addon/lib/main.js (7 diffs)

File differences

chrome_addon/lib/main.js
11
2
2
33
44
55
......
1919
2020
2121
22
23
2224
2325
2426
......
7173
7274
7375
76
7477
7578
7679
......
101104
102105
103106
107
104108
105109
106110
......
211215
212216
213217
218
214219
220
215221
216222
217223
218224
219
225
220226
221227
222228
......
260266
261267
262268
263
264
269
270
265271
266272
267273
......
434440
435441
436442
437
443
/*
Copyright (C) 2013-2016 Grégory Soutadé
Copyright (C) 2013-2017 Grégory Soutadé
This file is part of gPass.
var DEBUG = true;
var protocol_version = 4;
var account_url = null;
var crypto_v2_logins_size=0;
SERVER = {OK : 0, FAILED : 1, RESTART_REQUEST : 2};
async function ask_server(form, field, logins, domain, wdomain, mkey, submit)
{
account_url = await getPref("account_url");
var salt = parseURI.parseUri(account_url);
salt = salt["host"] + salt["path"];
if (await getPref("crypto_v1_compatible"))
{
crypto_v2_logins_size = key_index;
for(a=0; a<logins.length; a++, key_index++)
{
enc = await generate_request(domain, logins[a], mkey, global_iv, 1);
}
if (ret != SERVER.OK)
{
return;
}
if (ciphered_password != "")
{
debug("Ciphered password : " + ciphered_password);
if (matched_key >= logins.logins || server_protocol_version < 4)
if (matched_key >= crypto_v2_logins_size || server_protocol_version < 4)
// Crypto v1
{
clear_password = await decrypt_ecb(mkey, hex2a(ciphered_password));
notify("Error",
"Error");
}, false);
debug("connect to " + await getPref("account_url"));
gPassRequest.open("POST", await getPref("account_url"), true);
debug("connect to " + account_url);
gPassRequest.open("POST", account_url, true);
gPassRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
gPassRequest.send(keys);
console.log("Self test OK !");
}
self_test();
//self_test();

Archive Download the corresponding diff file