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 authored and Jonathan White committed 2021-02-26 14:24:22 -05:00
1 parent c5a2aa0a2a
commit c9c19d043f
2 files changed
+2 -9

No files matched your search

+1 -5
View File
@@ -224,9 +224,5 @@ ShareObserver::Result ShareExport::intoContainer(const QString& resolvedPath,
if (KeeShare::isContainerType(info, KeeShare::signedContainerFileType())) {
return intoSignedContainer(resolvedPath, reference, targetDb.data());
}
if (KeeShare::isContainerType(info, KeeShare::unsignedContainerFileType())) {
return intoUnsignedContainer(resolvedPath, reference, targetDb.data());
}
Q_ASSERT(false);
return {reference.path, ShareObserver::Result::Error, tr("Unexpected export error occurred")};
return intoUnsignedContainer(resolvedPath, reference, targetDb.data());
}
+1 -4
View File
@@ -344,8 +344,5 @@ ShareObserver::Result ShareImport::containerInto(const QString& resolvedPath,
if (KeeShare::isContainerType(info, KeeShare::signedContainerFileType())) {
return signedContainerInto(resolvedPath, reference, targetGroup);
}
if (KeeShare::isContainerType(info, KeeShare::unsignedContainerFileType())) {
return unsignedContainerInto(resolvedPath, reference, targetGroup);
}
return {reference.path, ShareObserver::Result::Error, tr("Unknown share container type")};
return unsignedContainerInto(resolvedPath, reference, targetGroup);
}