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

Fix: Allow anonymous download when NoAnonymousUploads is set #349

Merged
merged 1 commit into from
Jan 11, 2021
Merged

Fix: Allow anonymous download when NoAnonymousUploads is set #349

merged 1 commit into from
Jan 11, 2021

Conversation

ndombre
Copy link
Contributor

@ndombre ndombre commented Jan 8, 2021

Hello !

First I want to say thank you for your time and effort to build this project with so many features!

When I set the server up, I run into an issue.
It seems like the plik web client prevent user to list downloadable files even if the server allow it.

The bug can be reproduced by doing the following steps:

  • Start a server with the default configuration except NoAnonymousUploads set to true.
  • Then create a user, upload a file, copy the download link (The one like http://Plik_URL/#/?id=dowloadId), logout.
  • If an anonymous user tries to see the file you just upload by visiting the page you just copy. The client front end will redirect the visitor the login form without showing him the file he can download.

The correct behavior would be to not redirect the user to the login page.

The patch is exactly doing that: If the page is a download page, consider that the user do not need to login.

If you have any question feel free to ask!

When the option NoAnonymousUploads is set, any access to the web front end page will result in a login page
even if the login is not requested by the server.
This is an issue when a user wants to assess a download page (in /#?id=dowloadId)
So this commit disables the login check in the plik frontend client if the page is a download page.
@camathieu camathieu merged commit 4ba41a5 into root-gg:master Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants