fix: deprecate AID and enforce Cuid2 #10216
No reviewers
Labels
No Label
1️⃣ Good First Issue
❓needs more investigation
Accessibility
Antennas
Channels
Chat
Clips
CP/Settings
dependencies
Docker
Drive
External
Galleries
Groups
i18n
javascript
Kubernetes
Lists/Circles
Mobile
Mutes/Blocks
Notifications
Posts/Timelines
Widgets
‼️ wrong locales
☢️Breaking
♻️Duplicate
⚙️Server
⚠️bug?
✨Feature
🧩API
🐛Bug
💬Discussion
📖Doc
🌌Federation
💴has reward
🔥high priority
🚫Invalid
🙏low priority
🖍MFM
🧪needs test
📜Pages
🐢Performance
💚Refactor
🏠Room
🔒Security
🤖Service Worker
🧪Test
🚧WIP
🗿Wontfix
👩💻AiScript
🖥️Client
🛠️Dev
🏳️needs help
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: firefish/firefish#10216
Loading…
Reference in New Issue
There is no content yet.
Delete Branch ":deprecate-aid"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
This PR deprecates AID and enforce Cuid2 for security and horizontal scalability.
IDs generated with the default settings result in the form of
[8 chars timestamp] + [8 chars cuid2]
. Thus, roughly 1427399 IDs are needed in the same millisecond to reach 50% chance of collision. The total length and fingerprint can be configured indefault.yml
.As a result, this approach provides K-sortability and collision resistance, while preserving the backward compatibility with AID but giving up "complete"-sortability.
Locally tested.
Codeberg is not working right now, I'll try to open later.
Reopening now
@ -102,0 +88,4 @@
# No need to uncomment in most cases, but you may want to change
# these settings if you plan to run a large and/or distributed server.
# cuid: {
Should use the list format that the other items use
fixed