You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: