Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug - Found a bug in one-time feature #2182

Open
z0x0z opened this issue Mar 3, 2024 · 2 comments
Open

Bug - Found a bug in one-time feature #2182

z0x0z opened this issue Mar 3, 2024 · 2 comments

Comments

@z0x0z
Copy link

z0x0z commented Mar 3, 2024

The secret is removed from the database before even viewing it using the decryption key.

Steps to reproduce

  • Enter the text the encrypt at yopass.se and select one hr/one day/ week. Then enable the one-time and generate decryption key. Click encrypt
  • Copy the short link and paste it in another tab. Enter a "incorrect" decryption key and submit.
  • Now refresh the page again, then enter another "incorrect" decryption key and submit.
  • Now refresh the page again, then enter "correct" decryption key and submit
  • Notice, the response "Secret, does not exist"
  • Hence it proved, before viewing the secret, it gets deleted from database.

Please check and fix this..

@TassiloPitrasch
Copy link

I don't think this is a bug. Decryption happens in the browser, the back-end has no way of knowing if the secret has been decrypted successfully. If the secret is deleted only after the client had confirmed decryption, the one-time feature would be rendered useless, as the request for deletion could easily be prevented, keeping the secret in the database.

@vbakke
Copy link

vbakke commented Nov 1, 2024

I agree, @TassiloPitrasch . Preferable, we would not delete the secret untill it is properly decrypted. But there is no way for the server to know.

I suggest closing this issue, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants