Closed ZigaStrgar closed 7 years ago
I think hashids takes care of that already: https://github.com/ivanakimov/hashids.php#curses-
Have you encountered any bad words?
I must admit I did not test the package, just looked at the code briefly and read the README.md and saw the alphabet thing and taught about the things that could be generated and created the PR. And I see now, that you used the package hashids/hashids
which should fix the problem. You can freely close the PR since it's already taken care of.
With the removing of the following letters: 'a', 'e', 'i', 'o', 'u' as well as upper case ones we prevent the generator to accidentally create a slug with some curse/pervert/swear parts.
Could add to the alphabet characters as: '_', '-' to make the "pool of choice" bigger since 10 characters are now missing.
But still, number 3 can replace 'E', 4 can replace 'A', 0 can replace 'O' so still a little danger remains 😄