You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ca504a4
Browse filesBrowse the repository at this point in the historyBrowse files
fix(desktop): keep keyring identity until a recovery path exists
recover_from_keyring deleted the OS keyring entry on parse failure before
checking for a leftover identity.key. Steady-state installs are
marker-only, so that delete destroyed the only copy and forced Lost.
Probe the file first, and leave a corrupt keyring value in place when
entering Lost.
Signed-off-by: Taksh <[email protected]>
// No valid file to recover from. If the migration marker exists, a prior
664
-
// identity was stored in the keyring and is now corrupt AND gone — the key
665
-
// is unrecoverable. Enter Lost recovery instead of silently rotating.
664
+
// identity was stored in the keyring — keep the corrupt entry for support /
665
+
// manual export and enter Lost rather than silently rotating.
666
666
ifmigration_marker_path(data_dir).exists(){
667
667
let ephemeral = Keys::generate();
668
668
eprintln!(
669
-
"buzz-desktop: identity lost — keyring had corrupt data and no valid identity.key \
670
-
backup; prior identity (migration marker present) is unrecoverable; \
671
-
using ephemeral key {}, awaiting user re-import",
669
+
"buzz-desktop: identity lost — keyring value failed to parse and no valid identity.key backup exists; leaving the keyring entry in place; using ephemeral key {}, awaiting user re-import",
672
670
ephemeral.public_key().to_hex()
673
671
);
674
672
returnOk(ResolvedIdentity{
@@ -677,7 +675,11 @@ fn recover_from_keyring(
677
675
storage:IdentityStorage::Ephemeral,
678
676
});
679
677
}
680
-
// No marker: genuine first launch with a corrupt keyring. Generate fresh.
678
+
// No marker: genuine first launch with a corrupt keyring. Safe to clear and
679
+
// generate fresh — there was never a durable identity to protect.
680
+
ifletErr(e) = store.delete(IDENTITY_KEY_NAME){
681
+
eprintln!("buzz-desktop: failed to clear corrupt keyring value: {e}");
0 commit comments