mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-22 20:13:50 +08:00
Making the AntiForgeryAuthorizationFilter validate when an ValidateAntiForgeryTokenOrchardAttribute is present.
--HG-- branch : dev
This commit is contained in:
@@ -45,10 +45,10 @@ namespace Orchard.Mvc.Filters {
|
||||
if (!string.IsNullOrEmpty(request.QueryString[tokenFieldName])) {
|
||||
context.HttpContext = new HackHttpContext(context.HttpContext, (HttpContext)context.HttpContext.Items["originalHttpContext"]);
|
||||
((HackHttpRequest)context.HttpContext.Request).AddFormValue(tokenFieldName, context.HttpContext.Request.QueryString[tokenFieldName]);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user