mirror of
http://git.whoc.org.uk/git/password-manager.git
synced 2025-10-25 09:37:35 +02:00
Updated Copyright claims
- updated reference dates; - removed reference to Community Edition; - normalized logging using Clipperz.log[Warn|Error|Debug]
This commit is contained in:
@@ -1,25 +1,23 @@
|
||||
/*
|
||||
|
||||
Copyright 2008-2011 Clipperz Srl
|
||||
Copyright 2008-2013 Clipperz Srl
|
||||
|
||||
This file is part of Clipperz Community Edition.
|
||||
Clipperz Community Edition is an online password manager.
|
||||
This file is part of Clipperz, the online password manager.
|
||||
For further information about its features and functionalities please
|
||||
refer to http://www.clipperz.com.
|
||||
|
||||
* Clipperz Community Edition is free software: you can redistribute
|
||||
it and/or modify it under the terms of the GNU Affero General Public
|
||||
License as published by the Free Software Foundation, either version
|
||||
3 of the License, or (at your option) any later version.
|
||||
* Clipperz is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
* Clipperz Community Edition is distributed in the hope that it will
|
||||
be useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* Clipperz is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Affero General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
License along with Clipperz Community Edition. If not, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
License along with Clipperz. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
*/
|
||||
|
||||
@@ -329,7 +327,7 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.DirectLogin, Object, {
|
||||
|
||||
fixedConfiguration = Clipperz.Base.deepClone(aConfiguration);
|
||||
|
||||
//console.log("PROCESS CONFIGURATION", aConfiguration);
|
||||
//Clipperz.log("PROCESS CONFIGURATION", aConfiguration);
|
||||
switch (aConfiguration['bookmarkletVersion']) {
|
||||
case '0.1':
|
||||
fixedConfiguration['formData'] = this.fixFormDataFromBookmarkletVersion_0_1(aConfiguration['formData']);
|
||||
@@ -481,10 +479,9 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.DirectLogin, Object, {
|
||||
var bookmarkletConfiguration;
|
||||
|
||||
bookmarkletConfiguration = Clipperz.PM.DataModel.DirectLogin.checkBookmarkletConfiguration(aValue);
|
||||
//console.log("BOOKMARKLET CONFIGURATION", bookmarkletConfiguration);
|
||||
|
||||
return Clipperz.Async.callbacks("DirectLogin.setBookmarkletConfiguration", [
|
||||
MochiKit.Base.method(this, 'setValue', 'formData', bookmarkletConfiguration['form']),
|
||||
//function (aValue) { console.log("SET VALUE - formData", aValue); return aValue; },
|
||||
MochiKit.Base.method(this, 'setValue', 'bookmarkletVersion', bookmarkletConfiguration['version']),
|
||||
|
||||
MochiKit.Base.method(this, 'favicon'),
|
||||
@@ -536,10 +533,7 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.DirectLogin, Object, {
|
||||
|
||||
'updateInputsAfterChangingBookmarkletConfiguration': function () {
|
||||
return Clipperz.Async.callbacks("DirectLogin.updateInputsAfterChangingBookmarkletConfiguration", [
|
||||
// MochiKit.Base.method(this, 'getValue', ''),
|
||||
//function (aValue) { console.log("VALUE", aValue); return aValue },
|
||||
MochiKit.Base.method(this, 'getValue', 'formData'),
|
||||
//function (aValue) { console.log("FORM DATA", aValue); return aValue },
|
||||
MochiKit.Base.method(this, 'setInputWithFormDataConfiguration')
|
||||
], {trace:false});
|
||||
},
|
||||
@@ -550,7 +544,6 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.DirectLogin, Object, {
|
||||
return Clipperz.Async.callbacks("DirectLogin.inputValues", [
|
||||
MochiKit.Base.method(this, 'inputs'),
|
||||
MochiKit.Base.values,
|
||||
//function (aValue) { console.log("INPUTS", aValue); return aValue; },
|
||||
MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.partial(MochiKit.Base.method(this, 'inputValue'))),
|
||||
Clipperz.Async.collectAll,
|
||||
Clipperz.Base.mergeItems
|
||||
@@ -674,19 +667,16 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.DirectLogin, Object, {
|
||||
|
||||
this._bindings[anInput.name()] = newBinding;
|
||||
}, this))
|
||||
//console.log("THIS._BINDINGS", this._bindings);
|
||||
|
||||
return newBindingValues;
|
||||
|
||||
/*
|
||||
this._bindings = {};
|
||||
//console.log("CONFIGURATION", aConfiguration);
|
||||
|
||||
if (someValues['currentValues'] != null) {
|
||||
if (someValues['currentValues']['bindingData'] != null) {
|
||||
var bindingKey;
|
||||
|
||||
//console.log("BINDING DATA", someValues['currentValues']['bindingData']);
|
||||
for (bindingKey in someValues['currentValues']['bindingData']) {
|
||||
var newBinding;
|
||||
|
||||
|
||||
@@ -1,25 +1,23 @@
|
||||
/*
|
||||
|
||||
Copyright 2008-2011 Clipperz Srl
|
||||
Copyright 2008-2013 Clipperz Srl
|
||||
|
||||
This file is part of Clipperz Community Edition.
|
||||
Clipperz Community Edition is an online password manager.
|
||||
This file is part of Clipperz, the online password manager.
|
||||
For further information about its features and functionalities please
|
||||
refer to http://www.clipperz.com.
|
||||
|
||||
* Clipperz Community Edition is free software: you can redistribute
|
||||
it and/or modify it under the terms of the GNU Affero General Public
|
||||
License as published by the Free Software Foundation, either version
|
||||
3 of the License, or (at your option) any later version.
|
||||
* Clipperz is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
* Clipperz Community Edition is distributed in the hope that it will
|
||||
be useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* Clipperz is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Affero General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
License along with Clipperz Community Edition. If not, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
License along with Clipperz. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,25 +1,23 @@
|
||||
/*
|
||||
|
||||
Copyright 2008-2011 Clipperz Srl
|
||||
Copyright 2008-2013 Clipperz Srl
|
||||
|
||||
This file is part of Clipperz Community Edition.
|
||||
Clipperz Community Edition is an online password manager.
|
||||
This file is part of Clipperz, the online password manager.
|
||||
For further information about its features and functionalities please
|
||||
refer to http://www.clipperz.com.
|
||||
|
||||
* Clipperz Community Edition is free software: you can redistribute
|
||||
it and/or modify it under the terms of the GNU Affero General Public
|
||||
License as published by the Free Software Foundation, either version
|
||||
3 of the License, or (at your option) any later version.
|
||||
* Clipperz is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
* Clipperz Community Edition is distributed in the hope that it will
|
||||
be useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* Clipperz is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Affero General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
License along with Clipperz Community Edition. If not, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
License along with Clipperz. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
*/
|
||||
|
||||
@@ -87,7 +85,6 @@ Clipperz.PM.DataModel.DirectLoginFormValue.prototype = MochiKit.Base.update(null
|
||||
},
|
||||
|
||||
'setValue': function (aValue) {
|
||||
//console.log("DirectLoginFormValue.setValue", aValue);
|
||||
this._value = aValue;
|
||||
return this.directLogin().setValue('formValues' + '.' + this.key(), aValue);
|
||||
},
|
||||
|
||||
@@ -1,25 +1,23 @@
|
||||
/*
|
||||
|
||||
Copyright 2008-2011 Clipperz Srl
|
||||
Copyright 2008-2013 Clipperz Srl
|
||||
|
||||
This file is part of Clipperz Community Edition.
|
||||
Clipperz Community Edition is an online password manager.
|
||||
This file is part of Clipperz, the online password manager.
|
||||
For further information about its features and functionalities please
|
||||
refer to http://www.clipperz.com.
|
||||
|
||||
* Clipperz Community Edition is free software: you can redistribute
|
||||
it and/or modify it under the terms of the GNU Affero General Public
|
||||
License as published by the Free Software Foundation, either version
|
||||
3 of the License, or (at your option) any later version.
|
||||
* Clipperz is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
* Clipperz Community Edition is distributed in the hope that it will
|
||||
be useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* Clipperz is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Affero General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
License along with Clipperz Community Edition. If not, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
License along with Clipperz. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
*/
|
||||
|
||||
@@ -76,7 +74,7 @@ Clipperz.PM.DataModel.DirectLoginInput.prototype = MochiKit.Base.update(null, {
|
||||
/*
|
||||
'formConfiguration': function(someFormValues, someBindings, someFields) {
|
||||
var result;
|
||||
//console.log("### DirectLoginInput.formConfiguration", someFields);
|
||||
|
||||
if (this.shouldSetValue()) {
|
||||
switch (this.type()) {
|
||||
case 'select':
|
||||
@@ -154,12 +152,6 @@ Clipperz.PM.DataModel.DirectLoginInput.prototype = MochiKit.Base.update(null, {
|
||||
// binding = this.directLogin().bindings()[this.name()];
|
||||
binding = someBindings[this.name()];
|
||||
|
||||
//console.log("### binding", binding);
|
||||
//if (binding != null) {
|
||||
/// console.log(" binding.field()", binding.field());
|
||||
/// console.log(" binding.field().value()", binding.field().value());
|
||||
// console.log(" someFields[binding.fieldKey()].value()", someFields[binding.fieldKey()].value());
|
||||
//}
|
||||
result = MochiKit.DOM.INPUT({
|
||||
type:((this.type() != 'password') ? this.type() : 'text'),
|
||||
name:this.name(),
|
||||
|
||||
@@ -1,25 +1,23 @@
|
||||
/*
|
||||
|
||||
Copyright 2008-2011 Clipperz Srl
|
||||
Copyright 2008-2013 Clipperz Srl
|
||||
|
||||
This file is part of Clipperz Community Edition.
|
||||
Clipperz Community Edition is an online password manager.
|
||||
This file is part of Clipperz, the online password manager.
|
||||
For further information about its features and functionalities please
|
||||
refer to http://www.clipperz.com.
|
||||
|
||||
* Clipperz Community Edition is free software: you can redistribute
|
||||
it and/or modify it under the terms of the GNU Affero General Public
|
||||
License as published by the Free Software Foundation, either version
|
||||
3 of the License, or (at your option) any later version.
|
||||
* Clipperz is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
* Clipperz Community Edition is distributed in the hope that it will
|
||||
be useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* Clipperz is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Affero General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
License along with Clipperz Community Edition. If not, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
License along with Clipperz. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
*/
|
||||
|
||||
@@ -411,10 +409,6 @@ Clipperz.PM.DataModel.EncryptedRemoteObject.prototype = MochiKit.Base.update(nul
|
||||
]
|
||||
});
|
||||
deferredResult.addCallback(function (someValues) {
|
||||
//if (someValues['decryptedData'] != someValues['objectData']) {
|
||||
// console.log("ORIGINAL DATA", '[[[' + someValues['decryptedData'] + ']]]');
|
||||
// console.log("CURRENT DATA", '>>>' + someValues['objectData'] + '<<<');
|
||||
//}
|
||||
return (someValues['decryptedData'] != someValues['objectData']);
|
||||
});
|
||||
deferredResult.callback();
|
||||
|
||||
@@ -1,25 +1,23 @@
|
||||
/*
|
||||
|
||||
Copyright 2008-2011 Clipperz Srl
|
||||
Copyright 2008-2013 Clipperz Srl
|
||||
|
||||
This file is part of Clipperz Community Edition.
|
||||
Clipperz Community Edition is an online password manager.
|
||||
This file is part of Clipperz, the online password manager.
|
||||
For further information about its features and functionalities please
|
||||
refer to http://www.clipperz.com.
|
||||
|
||||
* Clipperz Community Edition is free software: you can redistribute
|
||||
it and/or modify it under the terms of the GNU Affero General Public
|
||||
License as published by the Free Software Foundation, either version
|
||||
3 of the License, or (at your option) any later version.
|
||||
* Clipperz is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
* Clipperz Community Edition is distributed in the hope that it will
|
||||
be useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* Clipperz is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Affero General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
License along with Clipperz Community Edition. If not, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
License along with Clipperz. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
*/
|
||||
|
||||
@@ -143,12 +141,12 @@ Clipperz.PM.DataModel.OneTimePassword.prototype = MochiKit.Base.update(null, {
|
||||
getRandomBytes = MochiKit.Base.method(Clipperz.Crypto.PRNG.defaultRandomGenerator(), 'getRandomBytes');
|
||||
|
||||
encodedPassphrase = new Clipperz.ByteArray(this.user().passphrase()).toBase64String();
|
||||
//MochiKit.Logging.logDebug("--- encodedPassphrase.length: " + encodedPassphrase.length);
|
||||
//Clipperz.logDebug("--- encodedPassphrase.length: " + encodedPassphrase.length);
|
||||
prefixPadding = getRandomBytes(getRandomBytes(1).byteAtIndex(0)).toBase64String();
|
||||
//MochiKit.Logging.logDebug("--- prefixPadding.length: " + prefixPadding.length);
|
||||
//Clipperz.logDebug("--- prefixPadding.length: " + prefixPadding.length);
|
||||
suffixPadding = getRandomBytes((500 - prefixPadding.length - encodedPassphrase.length) * 6 / 8).toBase64String();
|
||||
//MochiKit.Logging.logDebug("--- suffixPadding.length: " + suffixPadding.length);
|
||||
//MochiKit.Logging.logDebug("--- total.length: " + (prefixPadding.length + encodedPassphrase.length + suffixPadding.length));
|
||||
//Clipperz.logDebug("--- suffixPadding.length: " + suffixPadding.length);
|
||||
//Clipperz.logDebug("--- total.length: " + (prefixPadding.length + encodedPassphrase.length + suffixPadding.length));
|
||||
|
||||
packedPassphrase = {
|
||||
'prefix': prefixPadding,
|
||||
@@ -158,8 +156,8 @@ Clipperz.PM.DataModel.OneTimePassword.prototype = MochiKit.Base.update(null, {
|
||||
|
||||
// result = Clipperz.Base.serializeJSON(packedPassphrase);
|
||||
result = packedPassphrase;
|
||||
//MochiKit.Logging.logDebug("===== OTP packedPassprase: [" + result.length + "]" + result);
|
||||
//MochiKit.Logging.logDebug("<<< OneTimePassword.packedPassphrase");
|
||||
//Clipperz.logDebug("===== OTP packedPassprase: [" + result.length + "]" + result);
|
||||
//Clipperz.logDebug("<<< OneTimePassword.packedPassphrase");
|
||||
|
||||
return result;
|
||||
},
|
||||
@@ -176,8 +174,8 @@ Clipperz.PM.DataModel.OneTimePassword.prototype = MochiKit.Base.update(null, {
|
||||
var deferredResult;
|
||||
var result;
|
||||
|
||||
//MochiKit.Logging.logDebug(">>> OneTimePassword.encryptedData");
|
||||
//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - id: " + this.reference());
|
||||
//Clipperz.logDebug(">>> OneTimePassword.encryptedData");
|
||||
//Clipperz.logDebug("--- OneTimePassword.encryptedData - id: " + this.reference());
|
||||
result = {
|
||||
'reference': this.reference(),
|
||||
'key': this.key(),
|
||||
@@ -185,22 +183,22 @@ Clipperz.PM.DataModel.OneTimePassword.prototype = MochiKit.Base.update(null, {
|
||||
'data': "",
|
||||
'version': Clipperz.PM.Crypto.encryptingFunctions.currentVersion
|
||||
}
|
||||
//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 2: " + Clipperz.Base.serializeJSON(result));
|
||||
//Clipperz.logDebug("--- OneTimePassword.encryptedData - 2: " + Clipperz.Base.serializeJSON(result));
|
||||
deferredResult = new MochiKit.Async.Deferred();
|
||||
//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 3");
|
||||
//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.encryptedData - 1: " + res); return res;});
|
||||
//Clipperz.logDebug("--- OneTimePassword.encryptedData - 3");
|
||||
//deferredResult.addBoth(function(res) {Clipperz.logDebug("OneTimePassword.encryptedData - 1: " + res); return res;});
|
||||
//# deferredResult.addCallback(Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion, this.passwordValue(), this.packedPassphrase());
|
||||
deferredResult.addCallback(MochiKit.Base.method(this, 'encryptedPackedPassphrase'));
|
||||
//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 4");
|
||||
//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.encryptedData - 2: [" + res.length + "]" + res); return res;});
|
||||
//Clipperz.logDebug("--- OneTimePassword.encryptedData - 4");
|
||||
//deferredResult.addBoth(function(res) {Clipperz.logDebug("OneTimePassword.encryptedData - 2: [" + res.length + "]" + res); return res;});
|
||||
deferredResult.addCallback(function(aResult, res) {
|
||||
aResult['data'] = res;
|
||||
return aResult;
|
||||
}, result);
|
||||
//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 5");
|
||||
//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.encryptedData - 3: " + Clipperz.Base.serializeJSON(res)); return res;});
|
||||
//Clipperz.logDebug("--- OneTimePassword.encryptedData - 5");
|
||||
//deferredResult.addBoth(function(res) {Clipperz.logDebug("OneTimePassword.encryptedData - 3: " + Clipperz.Base.serializeJSON(res)); return res;});
|
||||
deferredResult.callback();
|
||||
//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 6");
|
||||
//Clipperz.logDebug("--- OneTimePassword.encryptedData - 6");
|
||||
|
||||
return deferredResult;
|
||||
},
|
||||
@@ -211,7 +209,7 @@ Clipperz.PM.DataModel.OneTimePassword.prototype = MochiKit.Base.update(null, {
|
||||
var deferredResult;
|
||||
var result;
|
||||
|
||||
//MochiKit.Logging.logDebug(">>> OneTimePassword.saveChanges");
|
||||
//Clipperz.logDebug(">>> OneTimePassword.saveChanges");
|
||||
result = {};
|
||||
deferredResult = new MochiKit.Async.Deferred();
|
||||
|
||||
@@ -230,16 +228,16 @@ Clipperz.PM.DataModel.OneTimePassword.prototype = MochiKit.Base.update(null, {
|
||||
}, result);
|
||||
|
||||
deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_sendingData');
|
||||
//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.saveChanges - 1: " + Clipperz.Base.serializeJSON(res)); return res;});
|
||||
//deferredResult.addBoth(function(res) {Clipperz.logDebug("OneTimePassword.saveChanges - 1: " + Clipperz.Base.serializeJSON(res)); return res;});
|
||||
deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'addNewOneTimePassword');
|
||||
|
||||
deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_updatingInterface');
|
||||
//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.saveChanges - 2: " + res); return res;});
|
||||
//deferredResult.addBoth(function(res) {Clipperz.logDebug("OneTimePassword.saveChanges - 2: " + res); return res;});
|
||||
deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'OTPUpdated');
|
||||
deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'oneTimePassword_saveChanges_done', null);
|
||||
//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.saveChanges - 2: " + res); return res;});
|
||||
//deferredResult.addBoth(function(res) {Clipperz.logDebug("OneTimePassword.saveChanges - 2: " + res); return res;});
|
||||
deferredResult.callback();
|
||||
//MochiKit.Logging.logDebug("<<< OneTimePassword.saveChanges");
|
||||
//Clipperz.logDebug("<<< OneTimePassword.saveChanges");
|
||||
|
||||
return deferredResult;
|
||||
},
|
||||
@@ -308,7 +306,6 @@ Clipperz.PM.DataModel.OneTimePassword.isValidOneTimePasswordValue = function(aPa
|
||||
var result;
|
||||
|
||||
// "yaxx k7ww - f8y6 tqz5 - 58b6 th44 - 9cwv q0fg"
|
||||
//console.log("Clipperz.PM.DataModel.OneTimePassword.isValidOneTimePasswordValue", aPassword);
|
||||
if (aPassword.replace(/[\s\-]/g, '').length == 32) {
|
||||
try {
|
||||
var passwordByteArray;
|
||||
@@ -347,7 +344,6 @@ Clipperz.PM.DataModel.OneTimePassword.normalizedOneTimePassword = function(aPass
|
||||
result = aPassword;
|
||||
}
|
||||
|
||||
//console.log("Clipperz.PM.DataModel.OneTimePassword.normalizedOneTimePassword", aPassword, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,25 +1,23 @@
|
||||
/*
|
||||
|
||||
Copyright 2008-2011 Clipperz Srl
|
||||
Copyright 2008-2013 Clipperz Srl
|
||||
|
||||
This file is part of Clipperz Community Edition.
|
||||
Clipperz Community Edition is an online password manager.
|
||||
This file is part of Clipperz, the online password manager.
|
||||
For further information about its features and functionalities please
|
||||
refer to http://www.clipperz.com.
|
||||
|
||||
* Clipperz Community Edition is free software: you can redistribute
|
||||
it and/or modify it under the terms of the GNU Affero General Public
|
||||
License as published by the Free Software Foundation, either version
|
||||
3 of the License, or (at your option) any later version.
|
||||
* Clipperz is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
* Clipperz Community Edition is distributed in the hope that it will
|
||||
be useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* Clipperz is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Affero General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
License along with Clipperz Community Edition. If not, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
License along with Clipperz. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,25 +1,23 @@
|
||||
/*
|
||||
|
||||
Copyright 2008-2011 Clipperz Srl
|
||||
Copyright 2008-2013 Clipperz Srl
|
||||
|
||||
This file is part of Clipperz Community Edition.
|
||||
Clipperz Community Edition is an online password manager.
|
||||
This file is part of Clipperz, the online password manager.
|
||||
For further information about its features and functionalities please
|
||||
refer to http://www.clipperz.com.
|
||||
|
||||
* Clipperz Community Edition is free software: you can redistribute
|
||||
it and/or modify it under the terms of the GNU Affero General Public
|
||||
License as published by the Free Software Foundation, either version
|
||||
3 of the License, or (at your option) any later version.
|
||||
* Clipperz is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
* Clipperz Community Edition is distributed in the hope that it will
|
||||
be useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* Clipperz is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Affero General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
License along with Clipperz Community Edition. If not, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
License along with Clipperz. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
*/
|
||||
|
||||
@@ -28,7 +26,6 @@ try { if (typeof(Clipperz.PM.DataModel.Record) == 'undefined') { throw ""; }} ca
|
||||
}
|
||||
|
||||
Clipperz.PM.DataModel.Record.Version = function(args) {
|
||||
//console.log(">>> Record.new");
|
||||
Clipperz.PM.DataModel.Record.Version.superclass.constructor.apply(this, arguments);
|
||||
|
||||
this._getVersionFunction = args.getVersion || Clipperz.Base.exception.raise('MandatoryParameter');
|
||||
@@ -99,7 +96,6 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record.Version, Clipperz.PM.DataModel
|
||||
'unpackData': function (someData) { // ++
|
||||
var result;
|
||||
|
||||
//console.log("Record.Version - UNPACK DATA", this, someData);
|
||||
result = someData;
|
||||
if ((someData['fields'] != null) && (someData['fields'] instanceof Array)) {
|
||||
var fields;
|
||||
@@ -292,7 +288,6 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record.Version, Clipperz.PM.DataModel
|
||||
|
||||
result = {};
|
||||
|
||||
//console.log("prepareRemoteDataWithKey", aKey);
|
||||
deferredResult = new Clipperz.Async.Deferred("Record.Version.prepareRemoteDataWithKey", {trace:false});
|
||||
if (this.isBrandNew() == false) {
|
||||
this.transientState()['originalReference'] = this.reference();
|
||||
|
||||
@@ -1,25 +1,23 @@
|
||||
/*
|
||||
|
||||
Copyright 2008-2011 Clipperz Srl
|
||||
Copyright 2008-2013 Clipperz Srl
|
||||
|
||||
This file is part of Clipperz Community Edition.
|
||||
Clipperz Community Edition is an online password manager.
|
||||
This file is part of Clipperz, the online password manager.
|
||||
For further information about its features and functionalities please
|
||||
refer to http://www.clipperz.com.
|
||||
|
||||
* Clipperz Community Edition is free software: you can redistribute
|
||||
it and/or modify it under the terms of the GNU Affero General Public
|
||||
License as published by the Free Software Foundation, either version
|
||||
3 of the License, or (at your option) any later version.
|
||||
* Clipperz is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
* Clipperz Community Edition is distributed in the hope that it will
|
||||
be useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* Clipperz is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Affero General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
License along with Clipperz Community Edition. If not, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
License along with Clipperz. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
*/
|
||||
|
||||
@@ -29,7 +27,6 @@ if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {};
|
||||
|
||||
|
||||
Clipperz.PM.DataModel.Record = function(args) {
|
||||
//console.log(">>> new Clipperz.PM.DataModel.Record", 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'));
|
||||
@@ -62,8 +59,6 @@ Clipperz.PM.DataModel.Record = function(args) {
|
||||
// this.setLabel('');
|
||||
}
|
||||
|
||||
//console.log("<<< new Clipperz.PM.DataModel.Record", args);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -210,7 +205,6 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
|
||||
'searchableContent': function () {
|
||||
var deferredResult;
|
||||
|
||||
//console.log(">>> searchableContent");
|
||||
deferredResult = new Clipperz.Async.Deferred("Record.searchableContent", {trace:false});
|
||||
|
||||
deferredResult.collectResults({
|
||||
@@ -224,7 +218,6 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
|
||||
return someValues['recordLabel'] + ' ' + someValues['directLoginLabels'].join(' ');
|
||||
});
|
||||
deferredResult.callback();
|
||||
//console.log("<<< searchableContent");
|
||||
|
||||
return deferredResult;
|
||||
},
|
||||
@@ -270,7 +263,6 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
|
||||
'saveOriginalDirectLoginStatusToTransientState': function () {
|
||||
if (this.transientState().getValue('directLogins') == null) {
|
||||
// this.transientState().setValue('directLogins', this._directLogins)
|
||||
//console.log("SET TRANSIENT STATE", Clipperz.Base.serializeJSON(MochiKit.Base.keys(this.transientState().getValue('directLogins'))))
|
||||
MochiKit.Iter.forEach(MochiKit.Base.keys(this._directLogins), MochiKit.Base.bind(function(aKey) {
|
||||
this.transientState().setValue('directLogins' + '.' + aKey, this._directLogins[aKey])
|
||||
}, this))
|
||||
@@ -329,7 +321,6 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
|
||||
'unpackRemoteData': function (someData) {
|
||||
var result;
|
||||
|
||||
//console.log("new Clipperz.PM.DataModel.Record.Version [2]");
|
||||
/*
|
||||
this._currentRecordVersion = new Clipperz.PM.DataModel.Record.Version({
|
||||
'reference': someData['currentVersion']['reference'],
|
||||
@@ -340,7 +331,6 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
|
||||
var versionKey;
|
||||
|
||||
for (versionKey in someData['versions']) {
|
||||
//console.log("### versionKey", versionKey);
|
||||
this._versions[versionKey] = new Clipperz.PM.DataModel.Record.Version({
|
||||
'reference': versionKey,
|
||||
'retrieveKeyFunction': MochiKit.Base.method(this, 'getVersionKey'),
|
||||
@@ -351,7 +341,6 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
|
||||
|
||||
// this._currentVersionReference = someData['currentVersion']['reference'];
|
||||
this._currentVersionReference = someData['currentVersion'];
|
||||
//console.log("=== currentVersionReference", this._currentVersionReference, someData);
|
||||
|
||||
result = Clipperz.PM.DataModel.Record.superclass.unpackRemoteData.apply(this, arguments);
|
||||
|
||||
@@ -536,7 +525,6 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
|
||||
//.........................................................................
|
||||
|
||||
'currentVersionReference': function () {
|
||||
//console.log("currentVersionReference");
|
||||
return this._currentVersionReference;
|
||||
},
|
||||
|
||||
@@ -585,7 +573,6 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
'getCurrentRecordVersionKey': function () {
|
||||
//console.log("getCurrentRecordVersionKey");
|
||||
return Clipperz.Async.callbacks("Record.getCurrentRecordVersionKey", [
|
||||
MochiKit.Base.method(this, 'getValue', 'currentVersionKey'),
|
||||
Clipperz.Async.deferredIf("currentVersionKey is NOT null", [
|
||||
@@ -606,10 +593,8 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
'invokeCurrentRecordVersionMethod': function (aMethodName, someValues) {
|
||||
//console.log(">>> invokeCurrentRecordVersionMethod", aMethodName);
|
||||
return Clipperz.Async.callbacks("Record.invokeCurrentRecordVersionMethod", [
|
||||
MochiKit.Base.method(this, 'getCurrentRecordVersion'),
|
||||
//function (aValue) { console.log("=== getCurrentRecordVersion", aValue); return aValue},
|
||||
MochiKit.Base.methodcaller(aMethodName, someValues)
|
||||
], {trace:false});
|
||||
},
|
||||
@@ -618,16 +603,11 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
|
||||
'lazilyinvokeCurrentRecordVersionMethod': function (aMethodName, someValues, defaultResult) {
|
||||
return Clipperz.Async.callbacks("Record.lazilyinvokeCurrentRecordVersionMethod", [
|
||||
MochiKit.Base.method(this, 'currentVersionReference'),
|
||||
//function (aValue) { console.log("LAZY -> versions", aValue); return aValue; },
|
||||
Clipperz.Async.deferredIf("versions has been loaded", [
|
||||
//function (aValue) { console.log("LAZY -> then"); return aValue; },
|
||||
MochiKit.Base.method(this, 'getCurrentRecordVersion'),
|
||||
MochiKit.Base.methodcaller(aMethodName, someValues),
|
||||
//function (aValue) { console.log("LAZY <- then"); return aValue; }
|
||||
], [
|
||||
//function (aValue) { console.log("LAZY -> else"); return aValue; },
|
||||
MochiKit.Base.partial(MochiKit.Async.succeed, defaultResult),
|
||||
//function (aValue) { console.log("LAZY <- else"); return aValue; }
|
||||
])
|
||||
], {trace:false});
|
||||
},
|
||||
@@ -648,7 +628,6 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
|
||||
],
|
||||
'directLogins': [
|
||||
MochiKit.Base.method(this, 'directLogins'),
|
||||
//function (aValue) { console.log("Record.directLogins", aValue); return aValue; },
|
||||
MochiKit.Base.values,
|
||||
MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.methodcaller('hasPendingChanges')),
|
||||
Clipperz.Async.collectAll,
|
||||
@@ -658,7 +637,6 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
|
||||
// }
|
||||
]
|
||||
});
|
||||
//deferredResult.addCallback(function (aValue) { console.log("Record.hasPendingResults", aValue); return aValue; });
|
||||
deferredResult.addCallback(MochiKit.Base.values);
|
||||
deferredResult.addCallback(MochiKit.Base.bind(function(someValues) {
|
||||
var result;
|
||||
@@ -776,7 +754,6 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
|
||||
MochiKit.Base.method(this, 'lazilyinvokeCurrentRecordVersionMethod', 'resetTransientState'),
|
||||
|
||||
MochiKit.Base.method(this, 'directLogins'),
|
||||
//function (aValue) { console.log("resetTransientState - directLogins", aValue); return aValue; },
|
||||
MochiKit.Base.values,
|
||||
MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.methodcaller('resetTransientState')),
|
||||
|
||||
@@ -816,7 +793,6 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
|
||||
//=========================================================================
|
||||
|
||||
'retrieveDirectLoginIndexDataFunction': function () {
|
||||
//console.log("Record.retrieveDirectLoginIndexDataFunction", this._retrieveDirectLoginIndexDataFunction);
|
||||
return this._retrieveDirectLoginIndexDataFunction;
|
||||
},
|
||||
|
||||
|
||||
@@ -1,25 +1,23 @@
|
||||
/*
|
||||
|
||||
Copyright 2008-2011 Clipperz Srl
|
||||
Copyright 2008-2013 Clipperz Srl
|
||||
|
||||
This file is part of Clipperz Community Edition.
|
||||
Clipperz Community Edition is an online password manager.
|
||||
This file is part of Clipperz, the online password manager.
|
||||
For further information about its features and functionalities please
|
||||
refer to http://www.clipperz.com.
|
||||
|
||||
* Clipperz Community Edition is free software: you can redistribute
|
||||
it and/or modify it under the terms of the GNU Affero General Public
|
||||
License as published by the Free Software Foundation, either version
|
||||
3 of the License, or (at your option) any later version.
|
||||
* Clipperz is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
* Clipperz Community Edition is distributed in the hope that it will
|
||||
be useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* Clipperz is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Affero General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
License along with Clipperz Community Edition. If not, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
License along with Clipperz. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,25 +1,23 @@
|
||||
/*
|
||||
|
||||
Copyright 2008-2011 Clipperz Srl
|
||||
Copyright 2008-2013 Clipperz Srl
|
||||
|
||||
This file is part of Clipperz Community Edition.
|
||||
Clipperz Community Edition is an online password manager.
|
||||
This file is part of Clipperz, the online password manager.
|
||||
For further information about its features and functionalities please
|
||||
refer to http://www.clipperz.com.
|
||||
|
||||
* Clipperz Community Edition is free software: you can redistribute
|
||||
it and/or modify it under the terms of the GNU Affero General Public
|
||||
License as published by the Free Software Foundation, either version
|
||||
3 of the License, or (at your option) any later version.
|
||||
* Clipperz is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
* Clipperz Community Edition is distributed in the hope that it will
|
||||
be useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* Clipperz is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Affero General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
License along with Clipperz Community Edition. If not, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
License along with Clipperz. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
*/
|
||||
|
||||
@@ -51,9 +49,7 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User.Header.OneTimePasswords, Clipper
|
||||
'packData': function (someData) { // ++
|
||||
var result;
|
||||
|
||||
console.log(">>> OneTimePasswords.packData", someData);
|
||||
result = Clipperz.PM.DataModel.User.Header.OneTimePasswords.superclass.packData.apply(this, arguments);
|
||||
console.log("<<< OneTimePasswords.packData");
|
||||
|
||||
return result;
|
||||
},
|
||||
@@ -63,9 +59,7 @@ console.log("<<< OneTimePasswords.packData");
|
||||
'packRemoteData': function (someData) {
|
||||
var result;
|
||||
|
||||
console.log(">>> OneTimePasswords.packRemoteData", someData);
|
||||
result = Clipperz.PM.DataModel.User.Header.OneTimePasswords.superclass.packRemoteData.apply(this, arguments);
|
||||
console.log("<<< OneTimePasswords.packRemoteData");
|
||||
|
||||
return result;
|
||||
},
|
||||
@@ -75,9 +69,7 @@ console.log("<<< OneTimePasswords.packRemoteData");
|
||||
'prepareRemoteDataWithKey': function (aKey) {
|
||||
var result;
|
||||
|
||||
console.log(">>> OneTimePasswords.prepareRemoteDataWithKey");
|
||||
result = Clipperz.PM.DataModel.User.Header.OneTimePasswords.superclass.prepareRemoteDataWithKey.apply(this, arguments);
|
||||
console.log("<<< OneTimePasswords.prepareRemoteDataWithKey");
|
||||
|
||||
return result;
|
||||
},
|
||||
|
||||
@@ -1,25 +1,23 @@
|
||||
/*
|
||||
|
||||
Copyright 2008-2011 Clipperz Srl
|
||||
Copyright 2008-2013 Clipperz Srl
|
||||
|
||||
This file is part of Clipperz Community Edition.
|
||||
Clipperz Community Edition is an online password manager.
|
||||
This file is part of Clipperz, the online password manager.
|
||||
For further information about its features and functionalities please
|
||||
refer to http://www.clipperz.com.
|
||||
|
||||
* Clipperz Community Edition is free software: you can redistribute
|
||||
it and/or modify it under the terms of the GNU Affero General Public
|
||||
License as published by the Free Software Foundation, either version
|
||||
3 of the License, or (at your option) any later version.
|
||||
* Clipperz is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
* Clipperz Community Edition is distributed in the hope that it will
|
||||
be useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* Clipperz is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Affero General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
License along with Clipperz Community Edition. If not, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
License along with Clipperz. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,25 +1,23 @@
|
||||
/*
|
||||
|
||||
Copyright 2008-2011 Clipperz Srl
|
||||
Copyright 2008-2013 Clipperz Srl
|
||||
|
||||
This file is part of Clipperz Community Edition.
|
||||
Clipperz Community Edition is an online password manager.
|
||||
This file is part of Clipperz, the online password manager.
|
||||
For further information about its features and functionalities please
|
||||
refer to http://www.clipperz.com.
|
||||
|
||||
* Clipperz Community Edition is free software: you can redistribute
|
||||
it and/or modify it under the terms of the GNU Affero General Public
|
||||
License as published by the Free Software Foundation, either version
|
||||
3 of the License, or (at your option) any later version.
|
||||
* Clipperz is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
* Clipperz Community Edition is distributed in the hope that it will
|
||||
be useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* Clipperz is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Affero General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
License along with Clipperz Community Edition. If not, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
License along with Clipperz. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
*/
|
||||
|
||||
@@ -32,7 +30,6 @@ if (typeof(Clipperz.PM.DataModel.User.Header) == 'undefined') { Clipperz.PM.Data
|
||||
Clipperz.PM.DataModel.User.Header.RecordIndex = function(args) {
|
||||
Clipperz.PM.DataModel.User.Header.RecordIndex.superclass.constructor.apply(this, arguments);
|
||||
|
||||
//console.log("NEW Clipperz.PM.DataModel.User.Header.RecordIndex", args);
|
||||
this._recordsData = new Clipperz.PM.DataModel.EncryptedRemoteObject({
|
||||
'name': 'recordsData',
|
||||
'retrieveKeyFunction': args.retrieveKeyFunction,
|
||||
@@ -118,7 +115,6 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User.Header.RecordIndex, Object, {
|
||||
},
|
||||
|
||||
'resetTransientState': function (isCommitting) {
|
||||
//console.log("######## UserHeaderRecordIndex - resetTransientState", Clipperz.Base.deepClone(this._transientState));
|
||||
if (this._transientState != null) {
|
||||
this._transientState.removeAllData();
|
||||
}
|
||||
@@ -158,7 +154,6 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User.Header.RecordIndex, Object, {
|
||||
},
|
||||
|
||||
'setDirectLoginIndexData': function (aDirectLoginReference, aKey, aValue) {
|
||||
//console.log("UserHeaderRecordIndex.setDirectLoginIndexData", aDirectLoginReference, this.directLoginsIndex()[aDirectLoginReference], aKey);
|
||||
//if (MochiKit.Base.isUndefinedOrNull(this.directLoginsIndex()[aDirectLoginReference])) {
|
||||
// throw "PIPPO";
|
||||
//}
|
||||
@@ -166,7 +161,6 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User.Header.RecordIndex, Object, {
|
||||
},
|
||||
|
||||
'addDirectLoginIndexData': function (aDirectLoginReference) {
|
||||
//console.log("UserHeaderRecordIndex.addDirectLoginIndexData", aDirectLoginReference, this.directLoginsIndex()[aDirectLoginReference]);
|
||||
return this.directLoginsData().setValue(this.directLoginsIndex()[aDirectLoginReference], {});
|
||||
},
|
||||
|
||||
@@ -261,12 +255,7 @@ Clipperz.log("SKIPPING record " + reference + " as there are no stas associated
|
||||
'record': record
|
||||
});
|
||||
} else {
|
||||
Clipperz.log("WARNING: DIRECT LOGIN without a matching RECORD!!");
|
||||
//console.log("direct login data", someData['directLogins']);
|
||||
//console.log("current direct login data", someData['directLogins'][indexReference])
|
||||
//console.log("reference", reference);
|
||||
//console.log("record index", this.recordsIndex());
|
||||
//console.log("record inverted index", recordsInvertedIndex);
|
||||
Clipperz.logWarning("WARNING: DIRECT LOGIN without a matching RECORD!!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,7 +294,6 @@ Clipperz.log("WARNING: DIRECT LOGIN without a matching RECORD!!");
|
||||
var deferredResult;
|
||||
var newRecord;
|
||||
|
||||
//console.log("#### new Clipperz.PM.DataModel.Record [4]");
|
||||
newRecord = new Clipperz.PM.DataModel.Record({
|
||||
'retrieveKeyFunction': MochiKit.Base.method(this, 'getRecordKey'),
|
||||
'retrieveRemoteDataFunction': this.retrieveRecordDetailFunction(),
|
||||
@@ -386,9 +374,7 @@ Clipperz.log("WARNING: DIRECT LOGIN without a matching RECORD!!");
|
||||
|
||||
this.transientState().setValue('newDirectLoginReferences' + '.' + newDirectLogin.reference(), newDirectLogin);
|
||||
|
||||
//console.log("UserHeaderRecordIndex.createNewDirectLogin [1]", newDirectLogin.reference(), newDirectLoginIndexValue);
|
||||
this.directLoginsIndex()[newDirectLogin.reference()] = newDirectLoginIndexValue;
|
||||
//console.log("UserHeaderRecordIndex.createNewDirectLogin [2]", newDirectLogin.reference(), this.directLoginsIndex()[newDirectLogin.reference()]);
|
||||
this.directLoginsData().setValue(this.directLoginsIndex()[newDirectLogin.reference()], {'record': this.recordsIndex()[aRecord.reference()]});
|
||||
|
||||
return newDirectLogin;
|
||||
@@ -431,7 +417,6 @@ Clipperz.log("WARNING: DIRECT LOGIN without a matching RECORD!!");
|
||||
// Clipperz.Async.collectAll
|
||||
// ]
|
||||
});
|
||||
//deferredResult.addCallback(function (aValue) { console.log("USER.Header.RecordIndex.hasAnyCleanTextData", aValue); return aValue});
|
||||
|
||||
// deferredResult.addCallback(MochiKit.Base.values);
|
||||
// deferredResult.addCallback(MochiKit.Base.flattenArguments);
|
||||
@@ -461,7 +446,6 @@ Clipperz.log("WARNING: DIRECT LOGIN without a matching RECORD!!");
|
||||
MochiKit.Base.methodcaller('hasPendingChanges')
|
||||
]
|
||||
});
|
||||
//deferredResult.addCallback(function (aValue) { console.log("UserHeaderIndex.hasPendingResults", aValue); return aValue; });
|
||||
deferredResult.addCallback(Clipperz.Async.or);
|
||||
// deferredResult.addCallback(MochiKit.Base.values);
|
||||
// deferredResult.addCallback(MochiKit.Base.flattenArguments);
|
||||
@@ -570,7 +554,6 @@ Clipperz.log("WARNING: DIRECT LOGIN without a matching RECORD!!");
|
||||
var deferredResult;
|
||||
var result;
|
||||
|
||||
//console.log("recordsIndex", this.recordsIndex());
|
||||
result = {};
|
||||
|
||||
deferredResult = new Clipperz.Async.Deferred("User.Header.RecordIndex.prepareRemoteDataWithKey", {trace:false});
|
||||
|
||||
@@ -1,25 +1,23 @@
|
||||
/*
|
||||
|
||||
Copyright 2008-2011 Clipperz Srl
|
||||
Copyright 2008-2013 Clipperz Srl
|
||||
|
||||
This file is part of Clipperz Community Edition.
|
||||
Clipperz Community Edition is an online password manager.
|
||||
This file is part of Clipperz, the online password manager.
|
||||
For further information about its features and functionalities please
|
||||
refer to http://www.clipperz.com.
|
||||
|
||||
* Clipperz Community Edition is free software: you can redistribute
|
||||
it and/or modify it under the terms of the GNU Affero General Public
|
||||
License as published by the Free Software Foundation, either version
|
||||
3 of the License, or (at your option) any later version.
|
||||
* Clipperz is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
* Clipperz Community Edition is distributed in the hope that it will
|
||||
be useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* Clipperz is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Affero General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
License along with Clipperz Community Edition. If not, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
License along with Clipperz. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
*/
|
||||
|
||||
@@ -328,7 +326,6 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User, Object, {
|
||||
var preferences;
|
||||
var oneTimePasswords;
|
||||
|
||||
//console.log(">>> ***************** user.unpackServerData", someServerData);
|
||||
// this.setServerLockValue(someServerData['lock']);
|
||||
|
||||
headerVersion = this.headerFormatVersion(someServerData['header']);
|
||||
@@ -417,7 +414,6 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User, Object, {
|
||||
};
|
||||
|
||||
this._serverData = unpackedData;
|
||||
//console.log("<<< ***************** user.unpackServerData", this._serverData);
|
||||
|
||||
return this._serverData;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user