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

Potential curse/profane/offensive words generated using xid (in a user-facing setting) #96

Open
athalhammer opened this issue Jun 22, 2023 · 2 comments

Comments

@athalhammer
Copy link
Contributor

My question is around xid's that may be facing users of a software (i.e. not just stored as keys in a database).

As it is a 20 characters string and the alphabet includes most characters of the alphabet there are decent probabilities that the accidental f*ck shows up or even whole offensive short sentences are formed. Has anyone considered this aspect before and, if yes, found reasonable solutions that would be practical?

I could think of:

  • re-encoding the bytes with a reduced alphabet
  • switching some of aeiou for wxyz
@athalhammer athalhammer changed the title Potential curse/profaney/offensive words generated using xid (in a user-facing setting) Potential curse/profane/offensive words generated using xid (in a user-facing setting) Jun 22, 2023
@athalhammer
Copy link
Contributor Author

I came up with my own solution to that issue where a non-standard alphabet is used but many properties of the existing xids are maintained.

https://github.com/athalhammer/erdi8-py#advanced-xid

Let me know if you have any alternative ideas.

@sbocinec
Copy link

sbocinec commented Aug 16, 2023

We are actually hitting similar issue using xid to generate unique strings to be used in GCP project names. Google does not disclose the full list of forbidden words, other than

https://cloud.google.com/resource-manager/docs/creating-managing-projects#before_you_begin
Cannot contain restricted strings, such as google, null, undefined, and ssl.

what often ends up in BadRequest / project_id contains prohibited words and the project creation failure.

In our cases, these are examples of the failed IDs:

  • cfei60asslu79cd7vgm0
  • cje975me0au3kmsslajg

I'm not sure there is a bullet-proof solution to generate non-offensive IDs other than hit, miss, retry

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