Skip to content

PUT /owners/{ownerId}/pets/{petId} allows updating pets that do not belong to the specified owner #310

@sourav-18

Description

@sourav-18

The endpoint PUT /api/owners/{ownerId}/pets/{petId} allows an owner to update a pet that does not belong to them.

Steps to reproduce:

  1. Use a valid ownerId
  2. Provide a petId that belongs to another owner
  3. Send update request

Actual:
The pet is updated successfully

Expected:
The update should be rejected (404 or 403)

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