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

fix(ApiService): Catch NotPermittedException and return 404 #6019

Merged
merged 2 commits into from
Jul 9, 2024

Conversation

mejo-
Copy link
Member

@mejo- mejo- commented Jul 9, 2024

📝 Summary

Also adjust 404 error message in create api function in case of NotPermittedException. We don't want to distinguish between missing permissions and nonexisting files to not reveal that the file exists.

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits

mejo- added 2 commits July 9, 2024 11:07
Signed-off-by: Jonas <jonas@freesources.org>
Also adjust 404 error message in create api function in case of
NotPermittedException. We don't want to distinguish between missing
permissions and nonexisting files to not reveal that the file exists.

Signed-off-by: Jonas <jonas@freesources.org>
@mejo- mejo- added this to the Nextcloud 30 milestone Jul 9, 2024
@mejo- mejo- requested review from blizzz and juliusknorr July 9, 2024 09:20
@mejo- mejo- self-assigned this Jul 9, 2024
@mejo-
Copy link
Member Author

mejo- commented Jul 9, 2024

/backport to stable29

@mejo- mejo- merged commit cfb9236 into main Jul 9, 2024
61 of 63 checks passed
@mejo- mejo- deleted the fix/return_codes branch July 9, 2024 10:23
@mejo-
Copy link
Member Author

mejo- commented Jul 9, 2024

/backport to stable28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants