-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Do not use easily-misread glyphs in Firestore auto-IDs. #4590
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
Conversation
This way the entropy is preserved after dropping the alphabet from 62 to 55 characters: >>> (62. / 55.)**20 10.979435205204474 >>> 55**20 < 62**20 < 55**21 True
|
@lukesneeringer This is the 3rd time you or I have sent this PR (once was in a private repo) 😀 The previous two were a no-go because we were waiting for a thumbs up from the Firestore team. |
|
@lukesneeringer @dhermes My fault. I just thought it has been approved and was just sitting, so I merged it. |
|
@dhermes This is a pretty minor change. Either merge it or close it and let's move on with our lives. :-) |
| self.assertEqual(result, mock_result) | ||
|
|
||
| mock_calls = [mock.call(_AUTO_ID_CHARS)] * 20 | ||
| mock_calls = [mock.call(_AUTO_ID_CHARS)] * 21 |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This PR removes
{'i', 'I', 'l', 'o', 'O', '0', '1'}from the set of characters used in automatically-generated IDs, because it is easy to mis-read them if you are in a situation where you need to do that.Exact set of blacklisted characters is loaned from Django's
make_random_password./cc @schmidt-sebastian
Was #4107