lemmy
lemmy copied to clipboard
Random instead of incremental post IDs
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)
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.
This is actually a duplicate of https://github.com/LemmyNet/lemmy/issues/1101 (both are talking about the same IDs).
Reopening this as its the general issue, #1101 is only about the activitypub part (which is really a followup to this issue).