Description
PATCH requests to /v1.0/drives/{drive-id} allow sending {"name":""}. The server responds with 200 OK and returns the drive object, but the name is not actually updated.
This is inconsistent with POST /v1.0/drives, which correctly returns 400 Bad Request for an empty name.
Steps to reproduce
curl 'https://ocis-server/graph/v1.0/drives/<drive-id>' \
-X PATCH \
-H 'Content-Type: application/json' \
--data-raw '{"name":""}' \
--insecure
Expected behavior
- HTTP 400 Bad Request
- Error message:
invalidRequest - invalid spacename: spacename must not be empty
Actual behavior
- HTTP 200 OK
- Drive object returned with original name still intact
Description
PATCH requests to
/v1.0/drives/{drive-id}allow sending{"name":""}. The server responds with200 OKand returns the drive object, but the name is not actually updated.This is inconsistent with POST
/v1.0/drives, which correctly returns400 Bad Requestfor an empty name.Steps to reproduce
Expected behavior
invalidRequest - invalid spacename: spacename must not be emptyActual behavior