security: use more antiforgery tokens

This commit is contained in:
Gary Sharp
2025-07-25 12:32:44 +10:00
parent fd43d85778
commit 7deead494b
222 changed files with 12919 additions and 11728 deletions
+2 -2
View File
@@ -4,7 +4,7 @@
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Lodge Warranty");
}
@using (Html.BeginForm(MVC.Job.LogWarranty(), FormMethod.Post))
@using (Html.BeginForm(MVC.Job.LogWarranty()))
{
@Html.AntiForgeryToken()
@Html.ValidationSummary(true)
@@ -191,7 +191,7 @@
).append(
$('<input>').attr({ type: 'hidden', name: 'ManualProviderReference', value: $('#ManualProviderReference').val() })
).append(
$('<input>').attr({ type: 'hidden', name: '__RequestVerificationToken', value: $providerId.closest('form').find('input[name="__RequestVerificationToken"]').val() })
$('<input>').attr({ type: 'hidden', name: '__RequestVerificationToken', value: document.body.dataset.antiforgery })
).appendTo('body').submit();
}