diff --git a/src/Admin/Controllers/ProvidersController.cs b/src/Admin/Controllers/ProvidersController.cs index eb1a3c13f..e27396aa1 100644 --- a/src/Admin/Controllers/ProvidersController.cs +++ b/src/Admin/Controllers/ProvidersController.cs @@ -70,6 +70,7 @@ namespace Bit.Admin.Controllers } [HttpPost] + [ValidateAntiForgeryToken] public async Task Create(CreateProviderModel model) { if (!ModelState.IsValid) diff --git a/src/Admin/Controllers/ToolsController.cs b/src/Admin/Controllers/ToolsController.cs index 95497fecf..28dff84af 100644 --- a/src/Admin/Controllers/ToolsController.cs +++ b/src/Admin/Controllers/ToolsController.cs @@ -60,6 +60,7 @@ namespace Bit.Admin.Controllers } [HttpPost] + [ValidateAntiForgeryToken] public async Task ChargeBraintree(ChargeBraintreeModel model) { if (!ModelState.IsValid) @@ -121,6 +122,7 @@ namespace Bit.Admin.Controllers } [HttpPost] + [ValidateAntiForgeryToken] public async Task CreateTransaction(CreateUpdateTransactionModel model) { if (!ModelState.IsValid) @@ -150,6 +152,7 @@ namespace Bit.Admin.Controllers } [HttpPost] + [ValidateAntiForgeryToken] public async Task EditTransaction(Guid id, CreateUpdateTransactionModel model) { if (!ModelState.IsValid) @@ -173,6 +176,7 @@ namespace Bit.Admin.Controllers } [HttpPost] + [ValidateAntiForgeryToken] public async Task PromoteAdmin(PromoteAdminModel model) { if (!ModelState.IsValid) @@ -208,6 +212,7 @@ namespace Bit.Admin.Controllers } [HttpPost] + [ValidateAntiForgeryToken] public async Task GenerateLicense(LicenseModel model) { if (!ModelState.IsValid) @@ -314,8 +319,9 @@ namespace Bit.Admin.Controllers }; return View(model); - } - + } + + [ValidateAntiForgeryToken] public async Task TaxRateUpload(IFormFile file) { if (file == null || file.Length == 0) @@ -382,6 +388,7 @@ namespace Bit.Admin.Controllers } [HttpPost] + [ValidateAntiForgeryToken] public async Task TaxRateAddEdit(TaxRateAddEditModel model) { var existingRateCheck = await _taxRateRepository.GetByLocationAsync(new TaxRate() { Country = model.Country, PostalCode = model.PostalCode }); @@ -416,17 +423,6 @@ namespace Bit.Admin.Controllers return RedirectToAction("TaxRate"); } - [HttpPost] - public async Task TaxRateUpdate(TaxRate model) - { - if (!string.IsNullOrWhiteSpace(model.Id)) - { - await _paymentService.UpdateTaxRateAsync(model); - } - - return RedirectToAction("TaxRate"); - } - public async Task TaxRateArchive(string stripeTaxRateId) { if (!string.IsNullOrWhiteSpace(stripeTaxRateId))