szabodanika / microbin

A secure, configurable file-sharing and URL shortening web app written in Rust.
https://microbin.eu
BSD 3-Clause "New" or "Revised" License
2.65k stars 163 forks source link

"Burn After" first read burns immediately after preview #201

Closed adan89lion closed 1 year ago

adan89lion commented 1 year ago

Describe the bug When set a text to burn after first read and hit save, the preview of the text will also be counted as a read.

To Reproduce Steps to reproduce the behavior:

  1. Change the Burn After parameter to Burn after 1st read
  2. Enter some text, and hit Save to submit
  3. Browser redirects to the text to "preview" the pasta
  4. The pasta is now gone and unable to share

Expected behavior The "burn" count should not count the "preview" of the pasta.

For instance, I want to share a password to a friend, and set the pasta to burn right after their first read. But when I try to copy the link, the link has already expired.

Screenshots N/A

Desktop (please complete the following information):

Additional context The issue didn't exist in MicroBin 1.x. The bug is also reproducible on Safari on iPadOS 17 Beta 3, assuming it's a cross-platform cross-browser issue.

adan89lion commented 1 year ago

Closing due to a duplication of #182