Yetangitu / owncloud-apps

Applications for Nextcloud and Owncloud personal cloud server
GNU Affero General Public License v3.0
87 stars 41 forks source link

OPDS catalog error #128

Open merrx opened 3 years ago

merrx commented 3 years ago

I use the fork from @noci2012, which worked fine with Nextcloud 18.

After updating to NC 19 I have the issue that I get the login credentials pop up, which normally is located on https://my-next-cloud/index.php/apps/files_opds directly on https://my-next-cloud. And if I change the URL on my mobile app (for accessing the OPDS catalog) to the root URL of the cloud, it could navigate like normal.

In short the .../app/files_opds URL doesn't work any more, but in general the app does work with the wrong URL. Unfortunately the nextcloud doesn't forward to the normal login page (https://my-next-cloud/login) any more, if the app is enabled.

I tried the master branch on noci2012/owncloud-apps (and the config patches, but they don't affect files_opds). NC 19.0.1

Yetangitu commented 3 years ago

OPDS Catalog was made for an ancient version of Owncloud and really shows its age, it also lacks many more 'advanced' options like search and sharding. I'm looking into making a new OPDS interface for Own/Nextcloud which does offer more of these options. I'll see if I can produce one more update to get the current version working in NC19, after that it is most likely curtains for this incarnation of OPDS Catalog.

merrx commented 3 years ago

A new up to date version with the features of recent Own/Nextcloud sounds very good. Thanks in advance. Can you link the new incarnation somewhere (main page or this issue), when you start/finished working on it?

Yetangitu commented 3 years ago

Once I have something worth presenting I'll link to it here.

4oo4 commented 3 years ago

@Yetangitu Has any progress been made, and can we assist with anything?

Cheers

qroac commented 3 years ago

@Yetangitu just read your announcement here. If you need any testers before presenting in public, I'm in ;)

4oo4 commented 3 years ago

I think @Yetangitu has moved on from this, so it might have to be fixed by someone else. I upgraded my server instance to 20.x, and I think I see where the issue is and a possible solution.

This is where the HTTP basic auth prompt comes from: https://github.com/Yetangitu/owncloud-apps/blob/457c1603fad5132ed17e27e99642c56381f169a0/files_opds/lib/util.php#L32-L52

I think Nextcloud also moved away from global HTTP basic auth in between versions 18 and 19, since I don't see a basic auth header when I use my instance without OPDS. So it looks like the OPDS app expects an HTTP basic auth header that isn't normally there anymore. I'd need to look through the commits on the server repo to confirm that.

I think the best way to fix it is to scope that HTTP basic auth check to just the feed URL, since that's the only place it will actually be used.

Also, I noticed that the reader app is broken since it depends on OPDS, so I think when this is fixed then reader will hopefully work too. Though, there may be other inconsistencies in both apps that need to be looked at too.

https://github.com/Yetangitu/owncloud-apps/blob/457c1603fad5132ed17e27e99642c56381f169a0/files_reader/lib/Service/MetadataService.php#L34-L43