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

[Security] Rework firewall access denied rule #34476

Closed
wants to merge 1 commit into from

Conversation

nesk
Copy link
Contributor

@nesk nesk commented Nov 21, 2019

Q A
Branch? 5.0
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #28229
License MIT
Doc PR n/a

It's currently impossible to provide a AccessDeniedHandler to Symfony, it will just be ignored. See #28229 for details.

@dimabory submitted a PR (#30423) to fix this, which was merged, but then reverted (#31142) due to a BC break in 3.4 branch (#31136).

Since the bug reported in #28229 still exists, I was planning to do a PR in the master branch before the 5.0 release, however time passed and I didn't see it would be released that soon. I hope this could still be merged as a hotfix in the 5.0 branch (despite the BC break) since I find this bug really annoying.

@nesk nesk changed the title Rework firewall access denied rule [Security] Rework firewall access denied rule Nov 21, 2019
@nesk nesk force-pushed the security-access-denied-rework branch from baa448e to c573f66 Compare November 21, 2019 09:46
@nesk
Copy link
Contributor Author

nesk commented Nov 21, 2019

Rebased the commit to define @dimabory as the author of the commit.

@chalasr chalasr added this to the next milestone Nov 21, 2019
@nesk nesk force-pushed the security-access-denied-rework branch from c573f66 to 9954f18 Compare November 27, 2019 10:31
@Nyholm
Copy link
Member

Nyholm commented May 3, 2020

Thank you for this PR. I've been researching this for about 45 minutes now.

This is the wrong approach Im afraid. The AccesDeniedHandler should only be called when an authenticated users is trying to access a resource they are not allowed to access. If an anonymous user is trying to access a protected resource, then a InsufficientAuthenticationException is thrown. Same thing with a user with "remember me".

I made symfony/symfony-docs#13615 to avoid confusion.

@fabpot fabpot closed this Aug 11, 2020
@nicolas-grekas nicolas-grekas modified the milestones: next, 5.2 Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants