lemmy icon indicating copy to clipboard operation
lemmy copied to clipboard

Random instead of incremental post IDs

Open eiclu opened this issue 4 years ago • 4 comments

For front end issues, use lemmy-ui

Is your proposal related to a problem?

Right now Post IDs start at one and will be simply counted up. This has some drawbacks:

  • It is possible to scrape a whole Lemmy instance by simply iterating all IDs
  • The amount of content on an instance is instantly apparent, some people hosting Lemmy may not want this
  • It is impossible to have link-private posts, where they won't appear in the feed/search but you can still access them by an ID

Describe the solution you'd like

Multiple possibilities:

  • Use the title as ID (issues when editing the title)
  • UUID Strings (leads to pretty long URLs)
  • base64 Strings (seems to be the best option. The length could be configurable)

eiclu avatar Nov 16 '20 19:11 eiclu

https://hashids.org/ is what you're looking for there, which we might potentially add at some point for the urls. But overall the scraping / iterative concerns aren't too big a deal to me, because everything is publicly available right now. Once we implement proper private communities, then access will be denied to even those who know a URL.

dessalines avatar Nov 16 '20 20:11 dessalines

This is actually a duplicate of https://github.com/LemmyNet/lemmy/issues/1101 (both are talking about the same IDs).

Nutomic avatar Feb 11 '21 13:02 Nutomic

Reopening this as its the general issue, #1101 is only about the activitypub part (which is really a followup to this issue).

Nutomic avatar Aug 08 '21 23:08 Nutomic