diff --git a/src/libsync/discoveryphase.cpp b/src/libsync/discoveryphase.cpp index 02722ceedac9..b6b383e3c9ae 100644 --- a/src/libsync/discoveryphase.cpp +++ b/src/libsync/discoveryphase.cpp @@ -697,6 +697,14 @@ void DiscoverySingleDirectoryJob::metadataReceived(const QJsonDocument &json, in } } + if (job->signature().isEmpty()) { + qCDebug(lcDiscovery) << "Initial signature is empty."; + _account->reportClientStatus(OCC::ClientStatusReportingStatus::E2EeError_GeneralError); + emit finished(HttpError{0, tr("Encrypted metadata setup error: initial signature from server is empty.")}); + deleteLater(); + return; + } + const auto e2EeFolderMetadata = new FolderMetadata(_account, _remoteRootFolderPath, statusCode == 404 ? QByteArray{} : json.toJson(QJsonDocument::Compact),