Closed rafasc closed 6 years ago
TLDR:
If you want a persistent URL, you should use a custom label
, also called "vanity url".
https://ptpb.pw/#vanity-pastes
new paste url
Yes, this is how updating pastes works--the underlying paste content was indeed updated in-place, but this also changes the digest, which in turn changes the short
and long
urls, which are derived from digest
(internally these are actually just view/route transformations of digest
, and aren't modeled at all the storage layer).
paste urls return status: not found
Due to the paste content being updated in-place, and that paste's digest being updated accordingly, there is indeed no longer a paste with that url.
Admittedly, while from an implementation perspective this behavior makes complete sense, and results in a very minimal data model, from a user perspective I understand the confusion.
Thanks for clarifying this. I made the wrong assumption and was trying to fix small mistakes on pastes that were are already posted.
What's the advantage from a user perspective to use that over something like:
https://ptpb.pw/~$(base64 /dev/urandom | head -c 8)
?
Or would this be considered abuse of service?
https://ptpb.pw/~$(base64 /dev/urandom | head -c 8) Or would this be considered abuse of service?
I explicitly declare this as a valid way to use this feature.
Related, I'm aware some people (and worse, services like IRC bots) try make some intermediate-sized paste IDs like:
https://ptpb.pw/AAAA.qqqqqq
This is 100% invalid, because the qqqqqq
portion is only used for mimetype calculation, and is not considered by the storage layer at all.
By contrast, using the label
feature is the correct way to accomplish the above outcome.
What's the advantage from a user perspective to use that over something like:
The origin of this model came from something like:
"How do I know if the paste I want to download hasn't changed from the last time I tried to download it?"
Provided you ~unconditionally trust pb's implementation and operational integrity, but not necessarily the same level of unconditional trust in the paste's author, selecting a paste by long
id robustly satisfies the implications of this question (or at least for as long as sha1
is considered unbroken, which currently is only arguably true).
This is also the origin of the ~
prefix; it symbolizes an "untrusted" user-defined ID.
Other than that, there is no advantage from a user perspective.
Updating a paste doesn't seem to be working. It returns a new paste url with different short and long urls.
The old paste urls return
status: not found
upon request.