From 710cf85d5dff1b57f6a4f2ed3873b7e58d5225e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aitor=20Arias=20Ben=C3=A9itez?= <80640002+Aitooor@users.noreply.github.com> Date: Wed, 25 Nov 2026 05:37:50 +0100 Subject: [PATCH] fix(v2.3): handle E2EE temporary-to-permanent state change and verified-email setup copy --- src/client/pages/PasteViewPage.tsx | 7 +++++-- src/client/pages/SetupPage.tsx | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/client/pages/PasteViewPage.tsx b/src/client/pages/PasteViewPage.tsx index 389e80e..b8c2fea 100644 --- a/src/client/pages/PasteViewPage.tsx +++ b/src/client/pages/PasteViewPage.tsx @@ -537,7 +537,7 @@ export default function PasteViewPage() { const handleStatePatch = async (patch: { visibility?: PasteVisibility; ttl?: PasteTtlOption }) => { if (!id || stateBusy || !canManageState) return; const effectiveName = stateName.trim() || name.trim(); - if (patch.ttl === 'permanent' && !effectiveName) { + if (patch.ttl === 'permanent' && !effectiveName && !isEncrypted) { addNotification('Enter a name first before switching to Permanent.'); return; } @@ -545,7 +545,10 @@ export default function PasteViewPage() { setStateBusy(true); try { const payload: Record = { ...patch }; - if (stateName.trim() && stateName.trim() !== name.trim()) { + if (isEncrypted && patch.ttl === 'permanent') { + // Keep the decrypted title private inside the E2EE payload; send generic label for server perm validation. + payload.name = 'Encrypted paste'; + } else if (stateName.trim() && stateName.trim() !== name.trim()) { payload.name = stateName.trim(); } const res = await fetch(`/api/paste/${encodeURIComponent(id)}`, { diff --git a/src/client/pages/SetupPage.tsx b/src/client/pages/SetupPage.tsx index 802058c..1f6c9ad 100644 --- a/src/client/pages/SetupPage.tsx +++ b/src/client/pages/SetupPage.tsx @@ -234,7 +234,9 @@ export default function SetupPage() { <>

{secret.totpOptional - ? 'Optional · Scan this QR code to enable 2FA, or skip and finish activation.' + ? preVerifiedPassword + ? 'Email verified · Finish without 2FA below, or optionally scan this QR code to enable 2FA.' + : 'Optional · Scan this QR code to enable 2FA, or skip and finish activation.' : 'Required for admins · Scan this QR code or enter the secret key, then type the 6-digit code.'}