edrlab / thorium-reader

A cross platform desktop reading app, based on the Readium Desktop toolkit
https://www.edrlab.org/software/thorium-reader/
BSD 3-Clause "New" or "Revised" License
1.65k stars 145 forks source link

OPDS 2 cover retrieval from HTTP does not use credentials? #1981

Open gotson opened 10 months ago

gotson commented 10 months ago

I am adding OPDS 2 to Komga, but i have some issues for cover retrieval when using OPDS 2.

Covers are behind the same HTTP Basic authentication as the OPDS feed itself (OPDS 1.2 or 2), but in that case Thorium does not show the covers.

By turning off the authentication completely, the covers are showing properly.

I am suspecting that Thorium does not pass the session cookies in the HTTP header when requesting the covers.

With an OPDS 1.2 catalog that has the same authentication mechanism Thorium can retrieve the covers just fine.

I tried finding Thorium logs on my Mac but couldn't find anything.

danielweck commented 10 months ago

mhmm, interesting that this seems to affect OPDS2(JSON) but not OPDS1(XML)

gotson commented 10 months ago

So i was testing v1 using my deployed server, and v2 using localhost.

I added v1 using localhost, and i don't have the covers either. So it may be about HTTP vs HTTPS ? My deployed server is using HTTPS, but on localhost i am using HTTP.

gotson commented 10 months ago

@danielweck i have forked the OPDS test catalog, added basic auth by using Caddy server, and reproduced the issue.

You can get the project from this branch https://github.com/gotson/opds2-test-catalog/tree/basic-auth, i added instructions in the README on how to run it.

When added to Thorium, the covers will not show.

panaC commented 10 months ago

Isn't relative from this https://github.com/edrlab/thorium-reader/pull/1832#issuecomment-1276450705 ?