OrchardCMS / OrchardCore

Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
https://orchardcore.net
BSD 3-Clause "New" or "Revised" License
7.23k stars 2.34k forks source link

ValidateReCaptchaAttribute uses OnResultExecutionAsync #8397

Open willgigg opened 3 years ago

willgigg commented 3 years ago

https://github.com/OrchardCMS/OrchardCore/blob/e3fb733af31c09e6441206b01e7edbaa7f803559/src/OrchardCore/OrchardCore.ReCaptcha.Core/ActionFilters/ValidateReCaptchaAttribute.cs#L20

Wouldn't this be more useful if the attribute used OnActionExecutionAsync to validate the recaptcha before the work is done on a controller? Or am I missing something?

Piedone commented 1 month ago

Yep, I think so.

hishamco commented 1 month ago

@willgigg can you submit a PR for it?