Skip to content

Conversation

@backportbot
Copy link

@backportbot backportbot bot commented May 22, 2025

Backport of PR #52810

artonge added 2 commits May 22, 2025 08:30
This currently prevent directly accessing a ressource when clicking on a link on a third party site. Example, clicking on `https://example.com/public.php/dav/files/pqLWcA269zfzXez/?accept=zip` in a GitHub comment.

Skipping the check is an issue with password protected shares, as it allows third party sites to request the ressource when the user already entered the password, aka CSRF.  So after removing the check from `base.php`, we need to add the it again in the `PublicAuth` plugin.

We also add a redirect to be helpful to the user.

**Warning**: this adds the limitation that clicking on a direct download link for password protected shares will redirect you to the password form, and then to the main share view.

Fix #52482

Signed-off-by: Louis Chemineau <louis@chmn.me>
…endpoint

Follow-up of #48098

Signed-off-by: Louis Chemineau <louis@chmn.me>
@backportbot backportbot bot requested review from artonge, skjnldsv and susnux May 22, 2025 08:30
@backportbot backportbot bot added bug 3. to review Waiting for reviews feature: sharing feature: dav php Pull requests that update Php code labels May 22, 2025
@backportbot backportbot bot added this to the Nextcloud 31.0.6 milestone May 22, 2025
@susnux susnux merged commit c85f6a6 into stable31 May 22, 2025
197 of 199 checks passed
@susnux susnux deleted the backport/52810/stable31 branch May 22, 2025 11:36
@nextcloud-bot nextcloud-bot mentioned this pull request Jun 4, 2025
10 tasks
@TomKamin1
Copy link

THANK YOU.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug feature: dav feature: sharing php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants