mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-09-12 21:58:58 -04:00
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:
1 parent
a9822a7e24
commit
8733428aed
1 file changed
+3
-1
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user