KeeShare: Default to unsigned container unless specifically chosen

*Fix #6081 - Prevent assert and crash due to user entered data
This commit is contained in:
Bernhard 2021-02-24 01:16:29 +01:00 committed by Jonathan White
parent c5a2aa0a2a
commit c9c19d043f
2 changed files with 2 additions and 9 deletions

View File

@ -224,9 +224,5 @@ ShareObserver::Result ShareExport::intoContainer(const QString& resolvedPath,
if (KeeShare::isContainerType(info, KeeShare::signedContainerFileType())) { if (KeeShare::isContainerType(info, KeeShare::signedContainerFileType())) {
return intoSignedContainer(resolvedPath, reference, targetDb.data()); return intoSignedContainer(resolvedPath, reference, targetDb.data());
} }
if (KeeShare::isContainerType(info, KeeShare::unsignedContainerFileType())) { return intoUnsignedContainer(resolvedPath, reference, targetDb.data());
return intoUnsignedContainer(resolvedPath, reference, targetDb.data());
}
Q_ASSERT(false);
return {reference.path, ShareObserver::Result::Error, tr("Unexpected export error occurred")};
} }

View File

@ -344,8 +344,5 @@ ShareObserver::Result ShareImport::containerInto(const QString& resolvedPath,
if (KeeShare::isContainerType(info, KeeShare::signedContainerFileType())) { if (KeeShare::isContainerType(info, KeeShare::signedContainerFileType())) {
return signedContainerInto(resolvedPath, reference, targetGroup); return signedContainerInto(resolvedPath, reference, targetGroup);
} }
if (KeeShare::isContainerType(info, KeeShare::unsignedContainerFileType())) { return unsignedContainerInto(resolvedPath, reference, targetGroup);
return unsignedContainerInto(resolvedPath, reference, targetGroup);
}
return {reference.path, ShareObserver::Result::Error, tr("Unknown share container type")};
} }