Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Sharing-NG] creating a drive item with random item id results in 201 response. #8724

Closed
S-Panta opened this issue Mar 25, 2024 · 1 comment · Fixed by #8817
Closed

[Sharing-NG] creating a drive item with random item id results in 201 response. #8724

S-Panta opened this issue Mar 25, 2024 · 1 comment · Fixed by #8817
Labels
Priority:p2-high Escalation, on top of current planning, release blocker Type:Bug

Comments

@S-Panta
Copy link
Contributor

S-Panta commented Mar 25, 2024

Describe the bug

Giving any random string ( other than an empty string) as a remote item ID for creating a drive item gives a 201 status code. The response will be empty though.

Steps to reproduce

  1. login to ocis as user user.
  2. go to shares and make API post request to create a drive item with some string.
curl -X POST 'https://host.docker.internal:9200/graph/v1beta1/drives/{share-Space-Id}/root/children'  
-d '{
    "remoteItem": {
        "id":"'123"
    }
}' -uadmin:admin
  1. The status code is 201.

It only checks for valid sharespace id and if remoteitem has empty string or not.
What should the expected behavior and status code be?

@rhafer rhafer added the Priority:p2-high Escalation, on top of current planning, release blocker label Mar 25, 2024
@rhafer
Copy link
Contributor

rhafer commented Mar 25, 2024

I think this should return a 400 (Bad Request)

@rhafer rhafer changed the title creating a drive item with random item id results in 201 response. [Sharing-NG] creating a drive item with random item id results in 201 response. Apr 3, 2024
@github-project-automation github-project-automation bot moved this from Qualification to Done in Infinite Scale Team Board Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:p2-high Escalation, on top of current planning, release blocker Type:Bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants