[codex] Fix known host fingerprint coverage (#1442)

* Fix known host fingerprint coverage

* Tighten SFTP host key verification
This commit is contained in:
陈大猫
2026-06-12 16:09:29 +08:00
committed by GitHub
parent 550a37b379
commit 910ef72205
17 changed files with 794 additions and 21 deletions

View File

@@ -194,7 +194,6 @@ function App({ settings }: { settings: SettingsState }) {
const keysRef = useRef(keys);
keysRef.current = keys;
const knownHostsRef = useRef(knownHosts);
knownHostsRef.current = knownHosts;
// Bridge the gap while useVaultState hydrates: its async init awaits
// hosts/keys/identities/proxyProfiles decryption before reading knownHosts,
// so the state is briefly [] at boot even when localStorage has entries.
@@ -205,6 +204,7 @@ function App({ settings }: { settings: SettingsState }) {
() => getEffectiveKnownHosts(knownHosts) ?? [],
[knownHosts],
);
knownHostsRef.current = effectiveKnownHosts;
const {
sessions,