-
Notifications
You must be signed in to change notification settings - Fork 186
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
Normal users can update the public link to delete its password if permission is not sent in data #7821
Comments
wow, good catch |
@SwikritiT What are the values for the The HTTP 200 with the error code and message in a response body is expected when the request fails. |
I could reproduce it without extra envs. Just start ocis by default |
I didn't set these variable so the values were whatever the default value is |
@SwikritiT I added the fix. Please review the failed test cases. coreApiSharePublicLink3/updatePublicLinkShare.feature:119 https://drone.owncloud.com/owncloud/ocis/29563/31/5 |
Hey thanks, I'll look at them |
Describe the bug
Normal users can update the public link to delete its password if permission is not sent in the data
Steps to reproduce
hello
curl -XPOST "https://localhost:9200/ocs/v1.php/apps/files_sharing/api/v1/shares" -u einstein:relativity -vk --form 'path="hello"' --form 'shareType=3' --form 'permissions=15' --form 'password=#Passw0rd'
curl -XPUT "https://localhost:9200/ocs/v1.php/apps/files_sharing/api/v1/shares/<shareId>" -u einstein:relativity -vk --form 'path="hello"' --form 'shareType=3' --form 'password='
Expected behavior
When we make the same request by sending permission in data we get HTTP 200 ( maybe this needs to be 400 or some 4xx status code?) and ocs
400
with some error message. So the behaviour should also be the same for when we try to update the public link without sending the permissionscurl -XPUT "https://localhost:9200/ocs/v1.php/apps/files_sharing/api/v1/shares/<shareId>" -u einstein:relativity -vk --form 'path="hello"' --form 'shareType=3' --form 'permissions=15' --form 'password='
Response
Actual behavior
The request returns
200
and the password is removed, you can access the public link from a browser without a passwordResponse
Setup
Please describe how you started the server and provide a list of relevant environment variables or configuration files.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: