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:
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user