Skip to content

Commit

Permalink
Merge pull request #3918 from kobergj/ReturnCorrectStatusCode
Browse files Browse the repository at this point in the history
Fix StatusCode
  • Loading branch information
kobergj authored May 25, 2023
2 parents d3e496e + 64f86b7 commit 9334e21
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog/unreleased/dont-enumerate-user.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ Bugfix: Dont enumerate users

Fixes a user enumeration via DELETE share endpoint

https://github.com/cs3org/reva/pull/3918
https://github.com/cs3org/reva/pull/3916
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ func (h *Handler) UpdateShare(w http.ResponseWriter, r *http.Request) {
h.updateShare(w, r, share) // TODO PUT is used with incomplete data to update a share}
return
}
response.WriteOCSError(w, r, response.MetaPathNotFound.StatusCode, "cannot find share", nil)
response.WriteOCSError(w, r, response.MetaNotFound.StatusCode, "cannot find share", nil)
}

func (h *Handler) updateShare(w http.ResponseWriter, r *http.Request, share *collaboration.Share) {
Expand Down Expand Up @@ -814,7 +814,7 @@ func (h *Handler) RemoveShare(w http.ResponseWriter, r *http.Request) {
h.removeSpaceMember(w, r, shareID, prov)
return
}
response.WriteOCSError(w, r, response.MetaPathNotFound.StatusCode, "cannot find share", nil)
response.WriteOCSError(w, r, response.MetaNotFound.StatusCode, "cannot find share", nil)
}

// ListShares handles GET requests on /apps/files_sharing/api/v1/shares
Expand Down

0 comments on commit 9334e21

Please sign in to comment.