Repository navigation
fix: protect share accept endpoint with CSRF token - #63952
Conversation
related error |
9e83232 to
75e2caa
Compare
Signed-off-by: kristian-zendato <kristian.zendato@nextcloud.com>
75e2caa to
4f938c3
Compare
|
/backport to stable35 |
| And As an "user1" | ||
| When accepting last share via the accept endpoint | ||
| And Logging in using web as "user1" | ||
| When opening last share accept confirmation page |
There was a problem hiding this comment.
Might be a good idea to add a negative regression test for GET behavior as a followup.
|
/backport to stable34 |
|
/backport to stable33 |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
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)