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

Sequential IDs make submitted code excessively non-private. #37

Open
MyrddinE opened this issue Jan 5, 2025 · 1 comment
Open

Sequential IDs make submitted code excessively non-private. #37

MyrddinE opened this issue Jan 5, 2025 · 1 comment

Comments

@MyrddinE
Copy link

MyrddinE commented Jan 5, 2025

I'm aware that this is a tool that allows anonymous users to compile and run code, but I think that a more appropriate method would be to generate random IDs rather than sequential to prevent visitors from browsing the code submitted by others.

If one-in-a-billion IDs was valid, it would make submissions functionally private even if they're still technically public.

@MyrddinE
Copy link
Author

MyrddinE commented Jan 5, 2025

Looks like the @id is generated by the database sequentially, then just converted to base36.

Perhaps using PostGres' gen_random_uuid() function? It would guarantee uniqueness, but it would make the URL a lot longer. Some increase is inevitable if switching from sequential to random. It's almost certainly the approach that would require the least work.

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

No branches or pull requests

1 participant