-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
error page from "OrchardCore.Diagnostics" module isn't presented when [ValidateAntiForgeryToken] attribute is used and validation failed #9987
Comments
Maybe a middleware order, specific to antiforgery token. |
this issue is related to this change |
@deanmarcussen seems this broken after #3993 |
@lampersky any suggestion on how to fix it? or if the order is the issue? |
@sebastienros when you are applying filter globally it means that every controller will be affected, even our DiagnosticsController and that's why we are observing issue with app.UseStatusCodePagesWithReExecute("/Error/{0}") The simplest way to fix this issue is just by adding [IgnoreAntiforgeryToken] attribute to DiagnosticsController. I've just prepared PR |
Describe the bug
Sometimes, when my "orchantiforgery_" cookie expires, and when login page is still opened in browser, I can't log in, because of AntiforgeryValidationException which is expected behavior, but instead of seeing error page from 'OrchardCore.Diagnostics' I see default one.
You can reproduce the issue by removing "orchantiforgery_" cookie, or by manipulating with html code.
Steps to reproduce the behavior:
Expected behavior
This error page should be presented to the user:
The text was updated successfully, but these errors were encountered: