mirror of
http://git.whoc.org.uk/git/password-manager.git
synced 2025-12-17 20:07:04 +01:00
Fixed corrupted card problem
Changes that check for a weird condition that was causing cards to get corrupted. A similar change has been applied also to /gamma (in a different commit, though)
This commit is contained in:
@@ -296,11 +296,15 @@ deferredResult.addErrback(MochiKit.Base.bind(function(res) {MochiKit.Logging.log
|
||||
this.setConnectionId(someParameters['connectionId']);
|
||||
this.user().setLoginInfo(someParameters['loginInfo']);
|
||||
this.user().setShouldDownloadOfflineCopy(someParameters['offlineCopyNeeded']);
|
||||
this.user().setLock(someParameters['lock']);
|
||||
|
||||
if ((isReconnecting == true) && (this.user().lock() != someParameters['lock'])) {
|
||||
throw Clipperz.PM.Connection.exception.StaleData;
|
||||
}
|
||||
|
||||
if (this.oneTimePassword() != null) {
|
||||
result.addCallback(MochiKit.Base.method(this.user().oneTimePasswordManager(), 'archiveOneTimePassword', this.oneTimePassword()));
|
||||
}
|
||||
|
||||
result.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'connection_loggedIn');
|
||||
result.addCallback(MochiKit.Async.succeed, someParameters);
|
||||
|
||||
@@ -577,5 +581,6 @@ Clipperz.PM.Connection.SRP['1.1'].prototype = MochiKit.Base.update(new Clipperz.
|
||||
});
|
||||
|
||||
Clipperz.PM.Connection.exception = {
|
||||
WrongChecksum: new MochiKit.Base.NamedError("Clipperz.ByteArray.exception.InvalidValue")
|
||||
WrongChecksum: new MochiKit.Base.NamedError("Clipperz.ByteArray.exception.InvalidValue"),
|
||||
StaleData: new MochiKit.Base.NamedError("Stale data")
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user