mirror of
https://github.com/bitwarden/server.git
synced 2025-04-05 21:18:13 -05:00
[PM-10961] Cannot delete MSP with apostrophe in name (#4846)
This commit is contained in:
parent
c44988694d
commit
a1e4e47e40
@ -367,7 +367,7 @@ public class ProvidersController : Controller
|
|||||||
return BadRequest("Provider does not exist");
|
return BadRequest("Provider does not exist");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.Equals(providerName.Trim(), provider.Name, StringComparison.OrdinalIgnoreCase))
|
if (!string.Equals(providerName.Trim(), provider.DisplayName(), StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
return BadRequest("Invalid provider name");
|
return BadRequest("Invalid provider name");
|
||||||
}
|
}
|
||||||
|
@ -20,9 +20,10 @@
|
|||||||
|
|
||||||
function deleteProvider(id) {
|
function deleteProvider(id) {
|
||||||
const providerName = $('#DeleteModal input#provider-name').val();
|
const providerName = $('#DeleteModal input#provider-name').val();
|
||||||
|
const encodedProviderName = encodeURIComponent(providerName);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: `@Url.Action("Delete", "Providers")?id=${id}&providerName=${providerName}`,
|
url: `@Url.Action("Delete", "Providers")?id=${id}&providerName=${encodedProviderName}`,
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
contentType: false,
|
contentType: false,
|
||||||
processData: false,
|
processData: false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user