fix(graph): keep CreateUploadSession strict below the public drive

The relaxed item addressing is a read feature; writing through it is untested
and not part of this surface.
This commit is contained in:
Dominik Schmidt committed 2026-09-08 11:21:02 +02:00
1 parent a9822a7e24
commit 8733428aed
1 file changed
+3 -1
+3 -1
View File
@@ -162,7 +162,9 @@ func (g Graph) CreateUploadSession(w http.ResponseWriter, r *http.Request) {
errorcode.RenderError(w, r, err)
return
}
if !driveItemInDrive(&driveID, &driveItemID) {
// strict on purpose: uploading through the public drive addressing is not
// part of the listing surface and stays untested for now
if driveID.GetStorageId() != driveItemID.GetStorageId() || driveID.GetSpaceId() != driveItemID.GetSpaceId() {
errorcode.ItemNotFound.Render(w, r, http.StatusNotFound, "Item does not exist")
return
}