fix: sync code not transferring identity when encryption enabled
_getAllData() was reading raw storage which contains encrypted blobs
when at-rest encryption is enabled. The sync code export would send
{ _ssLocalEncrypted: true, data: <blob> } instead of actual identity
data. The importing browser couldn't use these blobs.
Fixed _getAllData() to use Storage._readSecure() which decrypts
transparently. Fixed _applyData() to use Storage._writeSecure()
so imported data gets encrypted on the receiving end.
Also: hide the Auto-Sync Folder section entirely in browsers that
don't support File System Access API (Firefox, Brave, Safari)
instead of showing a broken-looking error message.
https://claude.ai/code/session_01SWSwDfMVij53bCTNSCLMwn
This commit is contained in:
@@ -721,6 +721,13 @@ let syncDirHandle = null;
|
||||
const SYNC_FILE_NAME = 'silent-send-sync.json';
|
||||
|
||||
async function initFileSync() {
|
||||
// Hide the entire section if File System Access API isn't supported
|
||||
if (!window.showDirectoryPicker) {
|
||||
const section = $('#fileSyncSection');
|
||||
if (section) section.style.display = 'none';
|
||||
return;
|
||||
}
|
||||
|
||||
syncDirHandle = await SilentSendSync.loadSyncDirHandle();
|
||||
updateFileSyncUI();
|
||||
if (syncDirHandle) {
|
||||
|
||||
Reference in New Issue
Block a user