Skip to content

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

@zertrin

Description

@zertrin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions