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

Define forbidden characters for first, last position and leading character #28

Closed
radeno opened this issue Oct 10, 2017 · 1 comment
Closed

Comments

@radeno
Copy link
Contributor

radeno commented Oct 10, 2017

Many people like me use this library as unique URL identifier and it works really good.

One thing should be better to generate friendly URLs. Restrict first and last characters like underscore and tilde ( _ ~ ) from default character set.
It is better human readable when ID is something like this: 0BM_z7D than this 0BMOz7_ or ~BMOz7D.

Same case why we should restrict special characters is when they leading next to each other.
Currently we can get some of these combinations: 0B__z7D, 0B~_z7D which also doesn't look so good.

@ai
Copy link
Owner

ai commented Oct 10, 2017

If you will forbid some symbols in start/end it will be bad for distribution.

If in you case you have problem with this symbols it will be better (more secure) to remove them from alphabet and increase ID length (to keep same collision probability).

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

2 participants