mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-22 13:11:55 +00:00
android: prevent imported archive from being written outside the export folder (#7375)
This commit is contained in:
1 parent
68916aa90a
commit
3b1e5abcbc
3 files changed
+8
-2
No files matched your search
@@ -345,7 +345,7 @@ class ArchiveConfig(
|
||||
### Import Flow
|
||||
|
||||
1. User selects an archive file.
|
||||
2. UI copies it to a temp location and constructs an `ArchiveConfig`.
|
||||
2. UI copies it into `databaseExportDir` and constructs an `ArchiveConfig`. The destination is confined to that folder: `getFileName` returns a bare file name on every platform, and `saveArchiveFromURI` checks the canonical destination before copying.
|
||||
3. Calls `apiImportArchive(config)` which sends `CC.ApiImportArchive` to the Haskell core.
|
||||
4. The core extracts and replaces both databases.
|
||||
5. Returns `CR.ArchiveImported` with a list of `ArchiveError` (non-fatal issues during import).
|
||||
|
||||
Reference in new issue
Block a user