-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[HttpKernel] Fix handling of MapRequest* attributes
#50125
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
Conversation
nicolas-grekas
commented
Apr 23, 2023
| Q | A |
|---|---|
| Branch? | 6.3 |
| Bug fix? | yes |
| New feature? | no |
| Deprecations? | no |
| Tickets | Fix #50120 |
| License | MIT |
| Doc PR | - |
|
@nicolas-grekas I cloned your repo, checked out your branch and used the
StacktraceDo you have the same error? |
a97336b to
949a2e2
Compare
|
Yes, I do. This should now be fixed. Can you please try again? |
|
@nicolas-grekas it works. I commented on the issue. |
|
We should be careful with usage of the payload as Subject from Controller Arguments in |
949a2e2 to
6cff3b1
Compare
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.
We should be careful with usage of the payload as Subject from Controller Arguments in [#IsGranted Attribute
Accessing unserialized payloads in #[IsGranted] directly contradicts the expectations described in #50120: the expectation there is that a payload shouldn't be parsed if we can rule out access to some route before said parsing happens, which makes sense to me.
One way to solve this would be to allow registering an IsGranted attribute for late evaluation, aka after other controller argument listeners. There might be others.
Let's merge this PR and solve late the case of accessing the parsed subject from IsGranted?
6cff3b1 to
c9855d0
Compare
791c5f3 to
6a82314
Compare
|
I updated the way traceable resolvers and serializers are wired so that we don't rely on service decoration, but use standard decoration instead. This preserves the definition of the original decorated service, so that we can e.g. use several tags on them without conflicts. |
6a82314 to
0d2733f
Compare
|
PR rebased on top of #50158 to split the concern of decoration apart. |
|
PR rebased and ready. |
|
Thanks @nicolas-grekas. |