From 61f4fbe67842922ddfaea76897bb02683bf4e9a9 Mon Sep 17 00:00:00 2001 From: Patrick Ecord Date: Sun, 21 Jun 2026 21:01:26 -0500 Subject: [PATCH] core: fix signed-out clipboard delivered as base64 instead of plaintext MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The send path always base64-encodes (seal_b64), but the receive path only called open_b64 when crypto was enabled — so with an empty account (crypto disabled) the base64 layer was never undone and clipboards arrived as "aGVsbG8tb3Zlci1sYW4=" instead of "hello-over-lan". Make open_b64 unconditional, symmetric with the always-on seal_b64: it base64-decodes then open()s, which passes through when crypto is disabled. The file path already uses raw seal/open with no base64, so only the text path needed the change. Pre-existing since the E2E commit 33d0fb7. Co-Authored-By: Claude Opus 4.8 --- core/src/lib.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/src/lib.rs b/core/src/lib.rs index 9877de3..c547f49 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -525,12 +525,12 @@ impl Engine { } continue; } - // Clipboard: decrypt (every transport carried ciphertext). - if crypto.enabled() { - match crypto.open_b64(&m.text) { - Some(plain) => m.text = plain, - None => continue, // not for us / wrong key - } + // Clipboard: undo the always-on base64 layer, then + // decrypt if enabled (open_b64 passes through when not). + // Symmetric with send's unconditional seal_b64. + match crypto.open_b64(&m.text) { + Some(plain) => m.text = plain, + None => continue, // not for us / wrong key } if m.text.is_empty() { continue;