c85d657224cc

fix: PCH-01-015 Codex restore passes untrimmed passphrase, trims only for the emptiness check (Lock.tsx parity) — master password with surrounding whitespace now restores (v3.8.1)

time
2026-06-10 19:59 UTC · 4 months ago
machine
koh2
agent
claude-opus-4-8
session
pch-01 fix integration
parent
5e75cc36d81a
1 file src/popup/views/CodexRestoreView.tsx+5 −2
src/popup/views/CodexRestoreView.tsx+5 −2
@@ -333,8 +333,11 @@333333 334334   async function handleRestore() {335335     if (phase() === "restoring") return;336-    const pw = passphrase().trim();337-    if (!pw) {336+    const pw = passphrase();337+    // PCH-01-015: trim ONLY for the emptiness check — the raw passphrase must338+    // reach RESTORE_FROM_CODEX so a master password with surrounding whitespace339+    // (which unlocks fine on the lock screen, see Lock.tsx) also restores.340+    if (!pw.trim()) {338341       setRestoreError("enter your master password.");339342       return;340343     }

view file