mirror of
http://git.whoc.org.uk/git/password-manager.git
synced 2025-10-29 02:17:36 +01:00
Merge branch 'master-wraith' into v1.0.4-work
This commit is contained in:
@@ -33,7 +33,8 @@ Clipperz.PM.DataModel.Record = function(args) {
|
||||
Clipperz.PM.DataModel.Record.superclass.constructor.apply(this, arguments);
|
||||
|
||||
this._updateDate = (args.updateDate ? Clipperz.PM.Date.parse(args.updateDate) : Clipperz.Base.exception.raise('MandatoryParameter'));
|
||||
this._accessDate = (args.accessDate ? Clipperz.PM.Date.parse(args.accessDate) : Clipperz.Base.exception.raise('MandatoryParameter'));
|
||||
// Disabled due to invalid data and the raised exception
|
||||
// this._accessDate = (args.accessDate ? Clipperz.PM.Date.parse(args.accessDate) : Clipperz.Base.exception.raise('MandatoryParameter'));
|
||||
|
||||
this._retrieveIndexDataFunction = args.retrieveIndexDataFunction || Clipperz.Base.exception.raise('MandatoryParameter');
|
||||
this._updateIndexDataFunction = args.updateIndexDataFunction || Clipperz.Base.exception.raise('MandatoryParameter');
|
||||
@@ -1754,4 +1755,4 @@ Clipperz.PM.DataModel.Record.labelContainsTag = function (aLabel, aTag) {
|
||||
|
||||
Clipperz.PM.DataModel.Record.labelContainsArchiveTag = function (aLabel) {
|
||||
return Clipperz.PM.DataModel.Record.labelContainsTag(aLabel, Clipperz.PM.DataModel.Record.archivedTag);
|
||||
};
|
||||
};
|
||||
|
||||
@@ -434,7 +434,8 @@ Clipperz.Base.extend(Clipperz.PM.Proxy.Offline.DataStore, Object, {
|
||||
randomBytes = Clipperz.Crypto.Base.generateRandomSeed();
|
||||
aConnection['b'] = new Clipperz.Crypto.BigInt(randomBytes, 16);
|
||||
v = new Clipperz.Crypto.BigInt(aConnection['userData']['v'], 16);
|
||||
aConnection['B'] = (Clipperz.Crypto.SRP.k().multiply(v)).add(Clipperz.Crypto.SRP.g().powerModule(aConnection['b'], Clipperz.Crypto.SRP.n()));
|
||||
//aConnection['B'] = (Clipperz.Crypto.SRP.k().multiply(v)).add(Clipperz.Crypto.SRP.g().powerModule(aConnection['b'], Clipperz.Crypto.SRP.n()));
|
||||
aConnection['B'] = ((Clipperz.Crypto.SRP.k().multiply(v)).add(Clipperz.Crypto.SRP.g().powerModule(aConnection['b'], Clipperz.Crypto.SRP.n())).module(Clipperz.Crypto.SRP.n()));
|
||||
|
||||
aConnection['A'] = someParameters.parameters.A;
|
||||
|
||||
@@ -443,7 +444,7 @@ Clipperz.Base.extend(Clipperz.PM.Proxy.Offline.DataStore, Object, {
|
||||
|
||||
nextTollRequestType = 'CONNECT';
|
||||
} else if (someParameters.message == "credentialCheck") {
|
||||
var v, u, s, S, A, K, M1;
|
||||
var v, u, s, S, A, K, M1, KK;
|
||||
var stringHash = function (aValue) {
|
||||
return Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(aValue)).toHexString().substring(2);
|
||||
};
|
||||
@@ -452,9 +453,11 @@ Clipperz.Base.extend(Clipperz.PM.Proxy.Offline.DataStore, Object, {
|
||||
A = new Clipperz.Crypto.BigInt(aConnection['A'], 16);
|
||||
u = new Clipperz.Crypto.BigInt(Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(A.asString(10) + aConnection['B'].asString(10))).toHexString(), 16);
|
||||
s = new Clipperz.Crypto.BigInt(aConnection['userData']['s'], 16);
|
||||
S = (A.multiply(v.powerModule(u, Clipperz.Crypto.SRP.n()))).powerModule(aConnection['b'], Clipperz.Crypto.SRP.n());
|
||||
//S = (A.multiply(v.powerModule(u, Clipperz.Crypto.SRP.n()))).powerModule(aConnection['b'], Clipperz.Crypto.SRP.n());
|
||||
S = v.powerModule(u, Clipperz.Crypto.SRP.n()).multiply(A).module(Clipperz.Crypto.SRP.n()).powerModule(aConnection['b'], Clipperz.Crypto.SRP.n());
|
||||
|
||||
K = stringHash(S.asString(10));
|
||||
KK = new Clipperz.Crypto.BigInt(K,16);
|
||||
|
||||
M1 = stringHash(
|
||||
"597626870978286801440197562148588907434001483655788865609375806439877501869636875571920406529" +
|
||||
@@ -462,7 +465,7 @@ Clipperz.Base.extend(Clipperz.PM.Proxy.Offline.DataStore, Object, {
|
||||
s.asString(10) +
|
||||
A.asString(10) +
|
||||
aConnection['B'].asString(10) +
|
||||
K
|
||||
KK.asString(10)
|
||||
);
|
||||
if (someParameters.parameters.M1 == M1) {
|
||||
var M2;
|
||||
@@ -1047,4 +1050,4 @@ Clipperz.PM.Proxy.Offline.DataStore.defaultAccountInfo = {
|
||||
'referenceDate': 'Fri, 03 April 2015 08:17:46 UTC',
|
||||
'isExpired': false,
|
||||
'expirationDate': 'Mon, 01 January 4001 00:00:00 UTC'
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1268,9 +1268,32 @@ Clipperz.log("THE BROWSER IS OFFLINE");
|
||||
];
|
||||
|
||||
var attributes = this.user().accountInfo()._attributes;
|
||||
MochiKit.Iter.forEach(usefulFields, function (aFieldName) {
|
||||
result[aFieldName] = attributes[aFieldName];
|
||||
})
|
||||
//
|
||||
// Disable loading of the details of the account. Hard code similar to the python frontend
|
||||
//
|
||||
// MochiKit.Iter.forEach(usefulFields, function (aFieldName) {
|
||||
// result[aFieldName] = attributes[aFieldName];
|
||||
// })
|
||||
|
||||
result['currentSubscriptionType'] = 'EARLY_ADOPTER' ;
|
||||
result['expirationDate'] = 'Mon, 01 January 4001 00:00:00 UTC' ;
|
||||
result['referenceDate'] = 'Fri, 03 April 2015 08:17:46 UTC' ;
|
||||
result['featureSet'] = 'FULL' ;
|
||||
result['features'] = ['UPDATE_CREDENTIALS',
|
||||
'EDIT_CARD',
|
||||
'CARD_DETAILS',
|
||||
'REGISTER_CARD',
|
||||
'ADD_CARD',
|
||||
'DELETE_CARD',
|
||||
'OFFLINE_COPY',
|
||||
'LIST_CARDS'];
|
||||
result['isExpired'] = false ;
|
||||
result['isExpiring'] = false ;
|
||||
result['paymentVerificationPending'] = false ;
|
||||
result['attachmentQuota'] = 100 ;
|
||||
result['certificateQuota'] = 100 ;
|
||||
|
||||
|
||||
};
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user