Difegue / LANraragi

Web application for archival and reading of manga/doujinshi. Lightweight and Docker-ready for NAS/servers.
https://lrr.tvc-16.science
MIT License
2.17k stars 152 forks source link

Escaping xml problem with the opds feature #961

Closed i30817 closed 5 months ago

i30817 commented 5 months ago

LRR Version and OS Please tell which version you're running, as well as your OS and installation method. (Windows, Docker, Native)

Built lanraragi from source, 32 bits antix (debian bookworm fork)

Bug Details

Was fucking around with the opds feature since although I have calibre web I'm ... Unsatisfied ... with how all ebook readers handle opds thumbnails (namely they only get the real thumbnail after downloading the book and extracting it from it), and wanted to see if lanraragi behaved better. Although of course, there would have to be a way to completely and cleanly seperate the epubs from the comics, from a hypothetical ebook reader, which I think there isn't - that would have been my next feature request (I tried to run 2 instances of lanraragi each pointing to different dirs and ports and something broke).

Anyway feeding the lanraragi opds url (of comics), to a ebook reader broke in parsing even before anything else was loaded (I expected it to break, but later once it realizes it wasn't a epub).

Specifically a comic was called "Queen & Country" and the ebook reader didn't appreciate a unescaped &.

So it seems like lanraragi is not escaping opds input.

Difegue commented 5 months ago

Archive data was always XML escaped properly for OPDS, but I'd missed handling it for categories; That mightve been what got it to crash here.

Should be fine to go now; If that's still not the case I'd appreciate a dump of whatever /api/opds spits out.