Page MenuHomePhorge

D14806.1765313903.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D14806.1765313903.diff

diff --git a/native/cpp/CommonCpp/DatabaseManagers/DatabaseManager.cpp b/native/cpp/CommonCpp/DatabaseManagers/DatabaseManager.cpp
--- a/native/cpp/CommonCpp/DatabaseManagers/DatabaseManager.cpp
+++ b/native/cpp/CommonCpp/DatabaseManagers/DatabaseManager.cpp
@@ -472,6 +472,9 @@
DatabaseManager::getQueryExecutor().copyContentFromDatabase(
DatabaseManager::restoredConnectionManager->getSQLiteFilePath(),
DatabaseManager::restoredConnectionManager->getBackupDataKey());
+ // Copying is the final step of the restore, we don't need it anymore, so we
+ // should clean all the data.
+ DatabaseManager::clearRestoredDatabaseSensitiveData();
}
} // namespace comm
diff --git a/web/shared-worker/worker/shared-worker.js b/web/shared-worker/worker/shared-worker.js
--- a/web/shared-worker/worker/shared-worker.js
+++ b/web/shared-worker/worker/shared-worker.js
@@ -542,6 +542,21 @@
SQLITE_RESTORE_DATABASE_PATH,
null,
);
+
+ // Copying is the final step of the restore, we don't need it anymore, so we
+ // should clean all the data.
+ const restoredSQLiteQueryExecutor = getSQLiteQueryExecutor(
+ databaseIdentifier.RESTORED,
+ );
+ if (restoredSQLiteQueryExecutor) {
+ clearSensitiveData(
+ dbModule,
+ SQLITE_RESTORE_DATABASE_PATH,
+ restoredSQLiteQueryExecutor,
+ );
+ setSQLiteQueryExecutor(null, databaseIdentifier.RESTORED);
+ }
+ await localforage.removeItem(RESTORED_SQLITE_CONTENT);
}
persistNeeded = true;

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 9, 8:58 PM (13 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5857767
Default Alt Text
D14806.1765313903.diff (1 KB)

Event Timeline