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

[information] Patch for read-only mode (zerobin archive, disallow new pastes) #119

Open
zertrin opened this issue Mar 28, 2024 · 1 comment

Comments

@zertrin
Copy link

zertrin commented Mar 28, 2024

This is not an issue per se, just wanted to share with the community how I turned my old zerobin instance into read-only mode.

Why?

Due to 1 I decided to not migrate the existing zerobin data to PrivateBin, as it would forever lock me on an old version (1.2.1) of it. I have thus setup a new, empty PrivateBin instance for myself, on a separate URL.

Because I still wanted existing pastes from my old zerobin instance to continue to be available at their existing URLs, I have decided to patch zerobin into a "read-only" mode instead.

How?

TL;DR: see this commit: zertrin@a3059fd (which is just on top of the latest master commit here, so it should apply cleanly)

Changes:

  • Edited the PHP code to return a descriptive error unconditionally if data is posted. (this enforces read-only mode)
  • Edited the JavaScript code to hide all UI elements that normally lead to states where we can create data, and added read-only information status to inform users.

image

@rugk
Copy link
Contributor

rugk commented Mar 28, 2024

Thanks, that sounds like a good idea. I have linked this in the PrivateBin wiki at https://github.com/PrivateBin/PrivateBin/wiki/Configuration#zerobincompatibility.

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

2 participants