Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Security] Rework firewall's access denied rule#30423
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
9b2acc0 to9073c94Comparesrc/Symfony/Component/Security/Http/Tests/Firewall/ExceptionListenerTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Security/Http/Tests/Firewall/ExceptionListenerTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
f1849b3 to461b2a4Comparecurry684 commentedApr 6, 2019
Please use a single PR per issue next time, easier to review. Fixes themself are fine. Status: reviewed |
curry684 commentedApr 6, 2019
Actually it shouldn't be based on |
curry684 commentedApr 6, 2019
@chalasr I just discussed with@michaelcullum that I think we should consider merging it into So I'd prefer putting it into |
nicolas-grekas commentedApr 7, 2019
Let's add some notes in the CHANGELOG.md file of the component, and give some instructions in UPGRADE-4.3.md then |
curry684 commentedApr 8, 2019
@dimabory can you pick that up? |
dimabory commentedApr 8, 2019
@curry684,@nicolas-grekas I'm not sure about B/C breaking. Can you guide me on what exactly can be broken with this change? |
curry684 commentedApr 8, 2019
The change may cause the AccessDeniedHandler to be executed now in cases where it wasn't before, and applications may depend on the previous erroneous behavior to some degree. Technically everything that changes existing behavior is to be considered BC breakage, but in this case the old behavior was technically wrong and out of spec, hence why we're accepting the fix in a minor release, but not backporting it. But the PR should mention it in the upgrade guide. |
chalasr commentedApr 8, 2019
Looking at the patch and the fixed ticket, I think we should merge in 3.4, every bugfix breaks someone's behavior. |
curry684 commentedApr 9, 2019
I'm mainly hesitant because it'll be a patch level change in low level security behavior. I'm hard pressed to find a harmful scenario but I prefer to err on the side of caution where access control is involved... 😉 |
dimabory commentedApr 9, 2019
So what's the base branch |
curry684 commentedApr 9, 2019
3.4. Technically it's correct for a bugfix, I won't object to it and@chalasr is the boss of security component 😉 |
461b2a4 to5790859Comparefabpot commentedApr 10, 2019
Thank you@dimabory. |
This PR was merged into the 3.4 branch.Discussion----------[Security] Rework firewall's access denied rule| Q | A| ------------- | ---| Branch? | 3.4| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | ~~#30099~~,#28229| License | MIT| Doc PR |Follow tickets provided above to reproduce bugs. (there are also some project examples)~~In addition, I'm looking for someone who knows an answer to [this](#30099 (comment)) regarding rework in this PR.~~Commits-------5790859 Rework firewall access denied rule
dimabory commentedApr 10, 2019
Excuse me, guys, but I didn't update |
fabpot commentedApr 10, 2019
@dimabory As this is a bug fix, there is no need to update the CHANGELOG/UPGRADE files. |
JarJak commentedApr 16, 2019
| $event->setException($e); | ||
| } | ||
| return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
this now calls the accessDeniedHandler even when we call the entry point, which looks weird.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Good point, but it's pretty much technically in line given the rest of the implementation (it also logs at 123, same thing). Not really trivial to fix given how the flow works...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
So if entry point returns 403 response you get endless redirect loop
andrew-demb commentedApr 17, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
These changes make log with message "Access denied, the user is neither anonymous, nor remember-me."(https://github.com/chalasr/symfony/blob/fd1408b13869a381fbebf9b9967f7a80e8b141d3/src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php#L137) lying, because token may be anonymous on |
andrew-demb commentedApr 17, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Also with this PR symfony call access denied handler without any context, that response already generated for anonymous token. In my case my handler doesn't expect calling for anonymous token and I got an infinite redirect. I think it's BC break. |
JarJak commentedApr 17, 2019
@andrew-demb fix is coming, see#31142 |
…ied rule (dimabory)" (chalasr)This PR was merged into the 3.4 branch.Discussion----------Revert "bug#30423 [Security] Rework firewall's access denied rule (dimabory)"| Q | A| ------------- | ---| Branch? | 3.4| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? |no| Tests pass? | yes| Fixed tickets |#31136| License | MIT| Doc PR | n/aCommits-------cd77f6f Revert "bug#30423 [Security] Rework firewall's access denied rule (dimabory)"
* 3.4: Revert "bug#30423 [Security] Rework firewall's access denied rule (dimabory)" [FrameworkBundle] minor: remove a typo from changelog [VarDumper][Ldap] relax some locally failing tests [Validator]#30192 Added the missing translations for the Tagalog ("tl") locale. Make MimeTypeExtensionGuesser case insensitive
* 4.2: Revert "bug#30423 [Security] Rework firewall's access denied rule (dimabory)" [FrameworkBundle] minor: remove a typo from changelog [VarDumper] fix tests with ICU 64.1 [VarDumper][Ldap] relax some locally failing tests [Validator]#30192 Added the missing translations for the Tagalog ("tl") locale. Make MimeTypeExtensionGuesser case insensitive Fix get session when the request stack is empty [Routing] fix trailing slash redirection with non-greedy trailing vars [FrameworkBundle] decorate the ValidatorBuilder's translator with LegacyTranslatorProxy
Uh oh!
There was an error while loading.Please reload this page.
#30099,#28229Follow tickets provided above to reproduce bugs. (there are also some project examples)
In addition, I'm looking for someone who knows an answer tothis regarding rework in this PR.