Skip to content

Commit

Permalink
Starting from scratch, then syncing with a file or a server, resulted…
Browse files Browse the repository at this point in the history
… in malformed passwords because the KGK wasn't properly extracted from the synced data. Fixed.
  • Loading branch information
607011 committed Dec 4, 2015
1 parent f07d3ad commit 1cb6bd3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Qt-SESAM/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1704,8 +1704,9 @@ void MainWindow::onSync(void)
tr("The sync file %1 cannot be opened for reading.")
.arg(d->optionsDialog->syncFilename()), QMessageBox::Ok);
}
if (d->doConvertLocalToLegacy && !d->optionsDialog->useSyncServer())
if (d->doConvertLocalToLegacy && !d->optionsDialog->useSyncServer()) {
warnAboutDifferingKGKs();
}
}
if (d->optionsDialog->useSyncServer()) {
if (d->masterPasswordChangeStep == 0) {
Expand Down Expand Up @@ -1759,8 +1760,8 @@ void MainWindow::syncWith(SyncPeer syncPeer, const QByteArray &remoteDomainsEnco
try {
SecureByteArray KGK;
baDomains = Crypter::decode(d->masterPassword.toUtf8(), remoteDomainsEncoded, CompressionEnabled, KGK);
if (d->KGK != KGK && !d->domains.isEmpty()) {
d->doConvertLocalToLegacy = true;
if (d->KGK != KGK) {
d->doConvertLocalToLegacy = !d->domains.isEmpty();
d->KGK = KGK;
}
}
Expand Down

0 comments on commit 1cb6bd3

Please sign in to comment.