-
Notifications
You must be signed in to change notification settings - Fork 187
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
POST request to create link with incorrect password returns 400 instead of 403 #8004
Comments
In other places, oCIS returns |
This is weird. 403 is not the suitable response IMO. The creation of the share is not forbidden. either it is a 400 bad request or 412 precondition failed |
technically, i agree. But, whatever the resolution, the response over the same effect should be the same in both backends, otherwise clients will have to double logic to handle the same error. |
Ok, we need to check with @janackermann and @2403905 can we make the ocs response „bug compatible“ with oc10? |
With the password_policy app and oC10 core, if an attempt is made to update the link password with one that does not meet the policy, then the OCS status is But when first creating a link, if the password does not meet the policy, then the OCS status is
That seems a bit strange to have |
Clarification:
|
@jesmrec Is that a release blocker for 5.0.0? We will switch to Sharing NG Asap after 5.0.0 has been released. |
I'd not block 5.0.0 for this. Will sharing NG fix this, then? |
Sharing NG is a new graph Api part. |
i know. The point is if sharing NG will return the correct code instead of the current sharing API. If it is, problem will be fixed by integrating sharing NG in clients. If not, problem will be moved to sharing NG. |
SharingNG already returns a 400 status code with an "invalidRequest" error code in the json body. |
@michaelstingl @jesmrec Do yo agree with a "won't fix" for OCS? |
@jesmrec causes real problems? |
i don't think so. I will do some QA in client side when the local check over policies is done to be sure about this. |
@jesmrec any updates? |
Our first current implementation for the oCIS password policy gets the |
Thanks. There are no changes on OCS planned. We will focus only on LibreGraph in the future. |
Describe the bug
If clients create a password for the link that does not match the policy, request returns
400 Bad Request
instead of403 Forbidden
Steps to reproduce
that curl simulates the operation
Expected behavior
Request is correct sintactically and semantically, so
400
is not proper error code. oC10 returns403
under same context. Apart of that, returnsfailure
instead oferror
Actual behavior
Setup
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: