Skip to content

Do not use easily-misread glyphs in Firestore auto-IDs. - #4107

Merged
chemelnucfin merged 2 commits into
masterfrom
autoid-no-confusing-chars
Dec 13, 2017
Merged

Do not use easily-misread glyphs in Firestore auto-IDs.#4107
chemelnucfin merged 2 commits into
masterfrom
autoid-no-confusing-chars

Conversation

@dhermes

Copy link
Copy Markdown
Contributor

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

@dhermesdhermes added the api: firestore Issues related to the Firestore API. label Oct 3, 2017
@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 3, 2017
@dhermes
dhermes removed the request for review from lukesneeringerOctober 3, 2017 18:12
@tseaver

Copy link
Copy Markdown
Contributor

I can't see how the test failure has anything to do with this change:

_______________test_wrap_method_with_overriding_retry_deadline_______________Traceback (mostrecentcalllast):
File"C:\projects\google-cloud-python\core\tests\unit\api_core\gapic\test_method.py", line159, intest_wrap_method_with_overriding_retry_deadlineasserttimeout_args== [5, 10, 20, 29]
AssertionError: assert [5.0, 10.0, 20.0, 30.0] == [5, 10, 20, 29]
Atindex3diff: 30.0!=29Fulldiff:
- [5.0, 10.0, 20.0, 30.0]
+ [5, 10, 20, 29]
==============================warningssummary===============================core/tests/unit/test_iam.py::TestPolicy::test_editors_setter

Luke Sneeringerand others added 2 commits December 4, 2017 11:17
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
@dhermes
dhermesforce-pushed the autoid-no-confusing-chars branch from e23f4a8 to 7611a97CompareDecember 4, 2017 19:18
@chemelnucfin
chemelnucfin merged commit 89c4415 into masterDec 13, 2017
@chemelnucfin

Copy link
Copy Markdown
Contributor

Likewise going to pull the trigger here. Please let me know if there are objections.

@dhermes

Copy link
Copy Markdown
ContributorAuthor

@chemelnucfin Can you revert this? We never got sign off from the Firestore team for this.

chemelnucfin added a commit that referenced this pull request Dec 13, 2017
chemelnucfin added a commit that referenced this pull request Dec 13, 2017
* Revert "Removing redundant constant. (#4588)"
This reverts commit be0493b.
* Revert "Spanner: Changed _rows to list (#4583)"
This reverts commit 0e4fc30.
* Revert "Do not use easily-misread glyphs in Firestore auto-IDs. (#4107)"
This reverts commit 89c4415.
@dhermes
dhermes deleted the autoid-no-confusing-chars branch December 13, 2017 23:22
@dhermes
dhermes restored the autoid-no-confusing-chars branch December 13, 2017 23:22
parthea pushed a commit that referenced this pull request Nov 24, 2025
* Do not use easily-misread glyphs in auto-IDs.
* Updating from 20 to 21 auto-id chars.
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
parthea pushed a commit that referenced this pull request Nov 24, 2025
* Revert "Removing redundant constant. (#4588)"
This reverts commit be0493b.
* Revert "Spanner: Changed _rows to list (#4583)"
This reverts commit 0e4fc30.
* Revert "Do not use easily-misread glyphs in Firestore auto-IDs. (#4107)"
This reverts commit 8715da91470904deeed368ac7064dee32c639779.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: firestoreIssues related to the Firestore API.cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@dhermes@tseaver@chemelnucfin@lukesneeringer@googlebot