Skip to content

An invalid ISBN causes the book page to crash (quite problematic) #3564

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

Open
prolibre opened this issue Apr 29, 2025 · 0 comments · May be fixed by #3573
Open

An invalid ISBN causes the book page to crash (quite problematic) #3564

prolibre opened this issue Apr 29, 2025 · 0 comments · May be fixed by #3573
Labels
bug Something isn't working

Comments

@prolibre
Copy link

On bookwyrm 0.7.5

Describe the bug
An invalid ISBN causes the book page to crash.

To Reproduce
All you have to do is edit a book and enter this isbn: 97801X45 (please note that you then have to correct this directly in the database).

Following a server-side error on a book, I looked at the logs and saw a line like :

Apr 29 09:57:02 master gunicorn[1647]: File "/DIR/bookwyrm/isbn/isbn.py", line 122, in __find_registrant
Apr 29 09:57:02 master gunicorn[1647]: if registrant_range[0] <= int(registrant) <= registrant_range[1]:
Apr 29 09:57:02 master gunicorn[1647]: ^^^^^^^^^^^^^^^
Apr 29 09:57:02 master gunicorn[1647]: ValueError: invalid literal for int() with base 10: '1X'

For some reason the book's ISBN was wrong. The value 97801X45 caused the page to crash.

@prolibre prolibre added the bug Something isn't working label Apr 29, 2025
@ilkka-ollakka ilkka-ollakka linked a pull request May 2, 2025 that will close this issue
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant