Describe the bug/problem
Currently, I am unable to download any books to my mobile reader via OPDS catalog.
I found that via the @download_required annotation on opds.py line 386, a function download_required in web.py is called, which returns a 403 - Forbidden if current_user.role_download() is not true.
As far as I can see, for OPDS current_user is always Guest (because authentication is done via HTTP Basic Authentication, if any).
So even for non-anonymous OPDS I have to give the Guest user the download permission.
Furthermore, as far as I can see, the Guest user is created on demand (create_anonymous_user in ub.py), but without the download permission, so download via OPDS is effectively disabled by default.
- Is this intended? If yes, is it documented how to enable it?
- The
Guest user is hidden in the user list, so the best solution I came up with is guessing the Guest users ID in /admin/user/X. Is there a better way to edit the Guest user or is this the intended one?
To Reproduce
Steps to reproduce the behavior:
- Try to download via OPDS from any device.
Logfile
Add content of calibre-web.log file or the relevant error, try to reproduce your problem with "debug" log-level to get more output.
None
Expected behavior
A clear and concise description of what you expected to happen.
Download should be possible or it should be documented that the Guest user requires download permission.
Screenshots
If applicable, add screenshots to help explain your problem.
None
Environment (please complete the following information):
- OS: Debian 10
- Python version: Python 3.7.3<
- Calibre-Web version: current
master (e16c0caebb93244d3ad1d2482553cc84d762c089)
- Docker container: None
- Special Hardware: LXC
- Browser: [e.g. Chrome 83.0.4103.97, Safari 13.3.7, Firefox 68.0.1 ESR]
Additional context
Add any other context about the problem here. [e.g. access via reverse proxy, database background sync, special database location]
Describe the bug/problem
Currently, I am unable to download any books to my mobile reader via OPDS catalog.
I found that via the
@download_requiredannotation onopds.pyline 386, a functiondownload_requiredinweb.pyis called, which returns a403 - Forbiddenifcurrent_user.role_download()is not true.As far as I can see, for OPDS
current_useris alwaysGuest(because authentication is done via HTTP Basic Authentication, if any).So even for non-anonymous OPDS I have to give the
Guestuser the download permission.Furthermore, as far as I can see, the
Guestuser is created on demand (create_anonymous_userinub.py), but without the download permission, so download via OPDS is effectively disabled by default.Guestuser is hidden in the user list, so the best solution I came up with is guessing theGuestusers ID in/admin/user/X. Is there a better way to edit theGuestuser or is this the intended one?To Reproduce
Steps to reproduce the behavior:
Logfile
Add content of calibre-web.log file or the relevant error, try to reproduce your problem with "debug" log-level to get more output.
None
Expected behavior
A clear and concise description of what you expected to happen.
Download should be possible or it should be documented that the
Guestuser requires download permission.Screenshots
If applicable, add screenshots to help explain your problem.
None
Environment (please complete the following information):
master(e16c0caebb93244d3ad1d2482553cc84d762c089)Additional context
Add any other context about the problem here. [e.g. access via reverse proxy, database background sync, special database location]