-
Notifications
You must be signed in to change notification settings - Fork 10.3k
No-op Authorization middleware for Razor Pages #7028
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
await _next(context); | ||
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.
I guess what I expected to see was for AuthorizeFilter
(MVC) to ignore AuthorizationMiddlewareInvokedKey
- so that we always run authorization twice. This should be a little bit slower, but it's is close to what we shipped in preview1 that didn't have this bug.
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.
Summing up offline conversation: Authenticate \ Authorize has side effects and I wanted to avoid running it twice if we could help it. This does work correctly for the particular scenario that is broken. I've added an additional test with controllers to make sure that works correctly too so we've covered all the bases.
64a2ecb
to
74df696
Compare
If this is ready to go, let's merge ASAP so we can rebuild the rest of the stack for P2. |
I'm confused about the contents of this PR. I can see test changes but no product code fix. |
This comment has been minimized.
This comment has been minimized.
Workaround for #7011
74df696
to
4b86197
Compare
🆙 📅 sorry about the confusion |
Merging this as flaky tests are blocking this for third round now. |
Workaround for #7011