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

internetarchive Item cant compute hash #540

Closed
hellupline opened this issue Jul 26, 2022 · 1 comment · Fixed by #571 · May be fixed by #639
Closed

internetarchive Item cant compute hash #540

hellupline opened this issue Jul 26, 2022 · 1 comment · Fixed by #571 · May be fixed by #639

Comments

@hellupline
Copy link

the hash function at https://github.com/jjjake/internetarchive/blob/master/internetarchive/item.py#L129 will fail if ujson is installed, as usjon.dumps doesnt have check_circular parameter

cclauss added a commit to cclauss/internetarchive that referenced this issue Dec 6, 2022
cclauss added a commit to cclauss/internetarchive that referenced this issue Dec 6, 2022
cclauss added a commit to cclauss/internetarchive that referenced this issue Dec 6, 2022
@JustAnotherArchivist
Copy link
Contributor

This was not fixed by #571.

JustAnotherArchivist added a commit to JustAnotherArchivist/internetarchive that referenced this issue Mar 21, 2024
Unless someone actively tries to break things by passing a crafted object, it should not generally be possible for there to be circular references. In addition, if someone were to do that, things would break in many other places, e.g. `MetadataPreparedRequest`, anyway. Guarding against a crash on hashing in that specific unusual scenario does not seem worthwhile and breaks when ujson is in use.

Fixes jjjake#540
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants