From 8d5b47aa9c3a53b8f76c3de12817c15c058ee2bf Mon Sep 17 00:00:00 2001 From: Thomas <28439359+thoda-dev@users.noreply.github.com> Date: Fri, 28 Aug 2026 15:21:25 +0200 Subject: [PATCH 1/2] fix(read): stop claiming a wrong password burns a read --- apps/app/app/pages/p/[id].vue | 9 ++++++++- apps/app/i18n/locales/en.json | 3 ++- apps/app/i18n/locales/fr.json | 3 ++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/apps/app/app/pages/p/[id].vue b/apps/app/app/pages/p/[id].vue index 61eb858..5feadff 100644 --- a/apps/app/app/pages/p/[id].vue +++ b/apps/app/app/pages/p/[id].vue @@ -35,6 +35,13 @@ const metaError = ref('') const meta = ref(null) const fragmentKey = ref(null) +// The password clause only holds where there is a password: `reveal.post.ts` folds the unlock hash +// into the atomic UPDATE, so a wrong one matches no row and spends nothing. +const burnWarning = computed(() => [ + t('read.burnWarningDescription'), + ...(meta.value?.passwordProtected ? [t('read.burnWarningPassword')] : []) +].join(' ')) + onMounted(async () => { const keyParam = new URLSearchParams(window.location.hash.replace(/^#/, '')).get('key') if (!keyParam) { @@ -174,7 +181,7 @@ async function copyText() { color="warning" variant="subtle" :title="t('read.burnWarningTitle')" - :description="t('read.burnWarningDescription')" + :description="burnWarning" /> Date: Fri, 28 Aug 2026 15:27:27 +0200 Subject: [PATCH 2/2] docs(read): note the legacy unlock-hash branch in the burn warning comment --- apps/app/app/pages/p/[id].vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/app/app/pages/p/[id].vue b/apps/app/app/pages/p/[id].vue index 5feadff..6a14860 100644 --- a/apps/app/app/pages/p/[id].vue +++ b/apps/app/app/pages/p/[id].vue @@ -35,8 +35,8 @@ const metaError = ref('') const meta = ref(null) const fragmentKey = ref(null) -// The password clause only holds where there is a password: `reveal.post.ts` folds the unlock hash -// into the atomic UPDATE, so a wrong one matches no row and spends nothing. +// Only where there is a password, and only for pastes carrying an unlock hash: `reveal.post.ts` +// spends nothing on a wrong one, but its `isNull` legacy branch still burns a read. const burnWarning = computed(() => [ t('read.burnWarningDescription'), ...(meta.value?.passwordProtected ? [t('read.burnWarningPassword')] : [])