Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Photo Download not work - UnauthorizedException #2051

Closed
tinohager opened this issue Nov 9, 2023 · 4 comments · Fixed by #2035
Closed

Photo Download not work - UnauthorizedException #2051

tinohager opened this issue Nov 9, 2023 · 4 comments · Fixed by #2035
Labels
bug Something isn't working

Comments

@tinohager
Copy link
Contributor

When I try to download an image of an album, a dialog opens where I can select the image resolution, it doesn't matter which resolution I choose I always get the error message 403. This problem does not occur for the administrator, but only for the users.

Log files of the docker

GET /api/Photo::getArchive?photoIDs=_cLHCxKtQReLW64Slc0RdT6W&kind=ORIGINAL
403

Log viewer

App\Http\Requests\BaseApiRequest::failedAuthorization:114 Insufficient privileges

My lychee docker run behind a proxy, i have set in my .env file.
TRUSTED_PROXIES=*

@schorschgit
Copy link

Unfortunately, you also have to make the album downloadable. Then it works for me (before the same error as for you).
Actually, I don't want to make all albums downloadable - but that's my workaround at the moment.

@tinohager
Copy link
Contributor Author

tinohager commented Nov 13, 2023

@schorschgit And where exactly did they set this? Do you have to register with them to see the photos? I don't want to make the album public.

@schorschgit
Copy link

oh, sorry - it's apparently only possible for public albums. I had the same error with a public album where anonymous users could not download images (same error message). When I released the album for download, it worked without errors. But only for public albums. I have not found a function to make entire albums downloadable for registered users (but would also be interested in a solution).

@ildyria
Copy link
Member

ildyria commented Nov 16, 2023

I am pretty sure this is already fixed in the soon (TM) Livewire version.
The reason being that access rights are now more granular.
See here: https://github.com/LycheeOrg/Lychee/blob/master/app/Policies/AlbumPolicy.php#L133

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants