Skip to content

fix: fail uploads when uri does not match session/share token - #63878

Open
salmart-dev wants to merge 3 commits into
masterfrom
fix/upload-home-match-uri
Open

fix: fail uploads when uri does not match session/share token#63878
salmart-dev wants to merge 3 commits into
masterfrom
fix/upload-home-match-uri

Conversation

@salmart-dev

@salmart-dev salmart-dev commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

This is a cosmetic change that can cause false security reports: the current implementation of the upload root collection returns UploadHome in every case, based on the current session, either the one of the logged in user, or for the share. The former allows uploading files in what looks like the upload folder of another user, but is in reality the one of the logged in user. Those requests will now fail with a 403 instead.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@salmart-dev salmart-dev self-assigned this Sep 1, 2026
@salmart-dev
salmart-dev force-pushed the fix/upload-home-match-uri branch from 75044c9 to 0f76eab Compare September 1, 2026 13:50
This is a cosmetic change that can cause false security reports: the
current implementation of the upload root collection returns UploadHome
in every case, based on the current session, either the one of the
logged in user, or for the share. The former allows uploading files in
what looks like the upload folder of another user, but is in reality the
one of the logged in user. Those requests will now fail with a 403
instead.

Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
Assisted-by: Claude:claude-sonnet-5
Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
Assisted-by: Claude:claude-sonnet-5
Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
@salmart-dev
salmart-dev force-pushed the fix/upload-home-match-uri branch from 0f76eab to e405683 Compare September 1, 2026 13:58
@salmart-dev salmart-dev added 3. to review Waiting for reviews and removed AI assisted labels Sep 1, 2026
@salmart-dev salmart-dev added this to the Nextcloud 35 milestone Sep 1, 2026
@salmart-dev

Copy link
Copy Markdown
Contributor Author

/backport to stable35

@salmart-dev

Copy link
Copy Markdown
Contributor Author

/backport to stable34

@salmart-dev

Copy link
Copy Markdown
Contributor Author

/backport to stable33

@salmart-dev
salmart-dev marked this pull request as ready for review September 1, 2026 14:00
@salmart-dev
salmart-dev requested a review from a team as a code owner September 1, 2026 14:00
@salmart-dev
salmart-dev requested review from Altahrim, CarlSchwan, icewind1991 and leftybournes and removed request for a team September 1, 2026 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants