-
Notifications
You must be signed in to change notification settings - Fork 31
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
Symfony Security return a 500 AccessDenied instead of a 403 with HttpException #31
Comments
a comment is added on this old long issue symfony/symfony#8467 |
when i look at the Security component documentation https://symfony.com/doc/master/bundles/SensioFrameworkExtraBundle/annotations/security.html I can see that we have to specify the status_code if we want an HTTP Exception instead of an AccessDeniedException But it's impossible to setup this status_code param with Api-platform. So i opened a new issue ta ask some helps about it : api-platform/api-platform#519 |
The only solution i see for instance is to add a listener for Api:
So maybe i have to do the same thing for the whole Sf4 project but it sounds crazy, the framework should do this or allow us to configure this... |
I also opened an issue to symfoney : Security + JSON_LOGIN return an HTTP 500 instead of an HTTP 403 #25806 |
and part of the #31 (even if it's almost a workaround because i'm adding a kinda listener)
I expect this to be a 'normal behavior' of json_login but not documented finely on Symfony docs. I don't see anything wrong in security.yaml that would explain this. I'm waiting for confirmation from here symfony/symfony#25806 |
No description provided.
The text was updated successfully, but these errors were encountered: