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

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

Merged
merged 2 commits into from
Dec 13, 2017

Conversation

dhermes
Copy link
Contributor

@dhermes dhermes commented Oct 3, 2017

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

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

tseaver commented Oct 3, 2017

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

_______________ test_wrap_method_with_overriding_retry_deadline _______________
Traceback (most recent call last):
  File "C:\projects\google-cloud-python\core\tests\unit\api_core\gapic\test_method.py", line 159, in test_wrap_method_with_overriding_retry_deadline
    assert timeout_args == [5, 10, 20, 29]
AssertionError: assert [5.0, 10.0, 20.0, 30.0] == [5, 10, 20, 29]
  At index 3 diff: 30.0 != 29
  Full diff:
  - [5.0, 10.0, 20.0, 30.0]
  + [5, 10, 20, 29]
============================== warnings summary ===============================
core/tests/unit/test_iam.py::TestPolicy::test_editors_setter

Luke Sneeringer and 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
@chemelnucfin chemelnucfin merged commit 89c4415 into master Dec 13, 2017
@chemelnucfin
Copy link
Contributor

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

@dhermes
Copy link
Contributor Author

dhermes commented Dec 13, 2017

@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the Firestore API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants