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

Reduced alphabet size when initializing a Hashid object and the hashids argument is not None #60

Closed
sgex opened this issue May 8, 2021 · 1 comment

Comments

@sgex
Copy link

sgex commented May 8, 2021

This commit a8e8366 seems to be incorrectly copying the alphabet at line 19 (self._alphabet = hashids._alphabet).

In Hashids the alphabet does not include separators so the alphabet argument passed into the constructor of Hashids is different from self._alphabet.

A common input alphabet is 0123456789abcdef. After separators are removed, hashids._alphabet will have fewer than the minimum of 16 characters, which is possibly the cause for #44

The old code didn't have this problem because it was not reading hashids._alphabet

@nshafer
Copy link
Owner

nshafer commented May 11, 2021

Thanks for the detailed report. I still can't reproduce #44, but this definitely caused issues with pickling and unpickling. I have fixed it in 3.3.0.

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