Skip to content

PATCH /v1.0/drives/{drive-id} accepts empty name #11887

@Ashim-Stha

Description

@Ashim-Stha

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions