fix: protect share accept endpoint with CSRF token - #63952
Open
kristian-zendato wants to merge 1 commit into
Open
fix: protect share accept endpoint with CSRF token#63952kristian-zendato wants to merge 1 commit into
kristian-zendato wants to merge 1 commit into
Conversation
Signed-off-by: kristian-zendato <kristian.zendato@nextcloud.com>
kristian-zendato
requested review from
come-nc,
icewind1991,
leftybournes,
skjnldsv,
sorbaugh and
susnux
and removed request for
a team
September 2, 2026 11:27
susnux
approved these changes
Sep 2, 2026
skjnldsv
approved these changes
Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The share accept link in notification emails previously accepted the share on a single GET request, which bypass CSRF protection. This change introduces a confirmation page and moves the actual acceptance to a POST request with a CSRF token.
/apps/files_sharing/accept/{shareId}— shows a confirmation page with sharer name and file name/apps/files_sharing/accept/{shareId}— accepts the share and redirects to the shared file (CSRF-protected)Screenshot of Accept page
Checklist
3. to review, feature component)stable32)AI (if applicable)