Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand ID range to harden brute forcing #71

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cgzones
Copy link
Contributor

@cgzones cgzones commented Sep 22, 2024

Expand the value space from 2^32 to 2^64, resulting in keys of length 11 instead of 6.
In particular important for one-time-pastes.
i64 is used as inner type since sqlite does not support storing u64.

@matze
Copy link
Owner

matze commented Sep 23, 2024

If I see correctly, this will break all existing paste ids?

@cgzones
Copy link
Contributor Author

cgzones commented Sep 25, 2024

Added backwards compatibility.

Expand the domain for IDs from 2^32 to 2^64, resulting in keys of length
11 instead of 6.
In particular important for one-time-pastes.
i64 is used as inner type since sqlite does not support storing u64.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants