Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

getReport throws SecurityException when getting a report that doesn't exist #93

Open
mgencur opened this issue Feb 13, 2019 · 0 comments

Comments

@mgencur
Copy link

mgencur commented Feb 13, 2019

The operation will return null as expected but on server side a SecurityException is thrown. This is different from e.g. getTest which will return a response with Content-Length: 0 (and no security exception is thrown on server side) and the status code is HttpStatus.SC_NOT_FOUND.

This is probably happening because AuthorizationServiceBean#isUserAuthorizedForReport can't get the report (because it doesn't exist anymore) and properly check permissions, so it returns false and this results in the SecurityException.

The question is whether we want to give the user information about the existence of the report by returning SC_NOT_FOUND or hide this info by throwing this security exception even if the report doesn't exist.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant