1
0
mirror of https://github.com/bitwarden/server synced 2026-01-17 16:03:49 +00:00

[pm-13985] Add a cancel endpoint to prevent authorization errors (#5229)

This commit is contained in:
Jimmy Vo
2025-02-18 09:53:49 -05:00
committed by GitHub
parent f80acaec0a
commit ac443ed495
2 changed files with 14 additions and 2 deletions

View File

@@ -251,6 +251,18 @@ public class ProvidersController : Controller
return View(provider);
}
[SelfHosted(NotSelfHostedOnly = true)]
public async Task<IActionResult> Cancel(Guid id)
{
var provider = await GetEditModel(id);
if (provider == null)
{
return RedirectToAction("Index");
}
return RedirectToAction("Edit", new { id });
}
[HttpPost]
[ValidateAntiForgeryToken]
[SelfHosted(NotSelfHostedOnly = true)]