Skip to content

Commit 1c3e30e

Browse files
committed
#2177 change position from __RequestVerificationToken from header to data in svelte, so the default ValidateAntiForgeryToken is working
1 parent 5ea4230 commit 1c3e30e

File tree

28 files changed

+88
-86
lines changed

28 files changed

+88
-86
lines changed

Components/App/BExIS.App.Bootstrap/Attributes/ValidateAntiForgeryTokenOnPost.cs renamed to Components/App/BExIS.App.Bootstrap/Attributes/CustomValidateAntiForgeryToken.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace BExIS.App.Bootstrap.Attributes
66
{
7-
public class ValidateAntiForgeryTokenOnPost: FilterAttribute, IAuthorizationFilter
7+
public class CustomValidateAntiForgeryToken: FilterAttribute, IAuthorizationFilter
88
{
99
public void OnAuthorization(AuthorizationContext filterContext)
1010
{

Components/App/BExIS.App.Bootstrap/BExIS.App.Bootstrap.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
<Compile Include="Attributes\MinCapacityAttribute.cs" />
113113
<Compile Include="Attributes\NoNullOrEmptyItemsAttribute.cs" />
114114
<Compile Include="Attributes\ThrottlingFilterAttribute.cs" />
115-
<Compile Include="Attributes\ValidateAntiForgeryTokenOnPost.cs" />
115+
<Compile Include="Attributes\CustomValidateAntiForgeryToken.cs" />
116116
<Compile Include="Extensions\AuthorizationContextExtensions.cs" />
117117
<Compile Include="Helpers\BExISAuthorizeHelper.cs" />
118118
<Compile Include="Helpers\JwtHelper.cs" />

Console/BExIS.Web.Shell.Svelte/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Console/BExIS.Web.Shell.Svelte/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
},
5353
"type": "module",
5454
"dependencies": {
55-
"@bexis2/bexis2-core-ui": "0.4.49",
55+
"@bexis2/bexis2-core-ui": "0.4.53",
5656
"@sveltejs/adapter-static": "3.0.2",
5757
"buffer": "6.0.3",
5858
"gray-matter": "4.0.3",

Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI.Svelte/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
},
5151
"type": "module",
5252
"dependencies": {
53-
"@bexis2/bexis2-core-ui": "0.4.49",
53+
"@bexis2/bexis2-core-ui": "0.4.53",
5454
"@bexis2/bexis2-rpm-ui": "0.2.11",
5555
"@floating-ui/dom": "1.6.8",
5656
"@fortawesome/free-solid-svg-icons": "6.6.0",

Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/CreateController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ public JsonResult Get(long id)
244244

245245
[JsonNetFilter]
246246
[HttpPost]
247-
[ValidateAntiForgeryTokenOnPost]
247+
[ValidateAntiForgeryToken]
248248
public JsonResult Create(CreateModel data)
249249
{
250250
if (data == null) return Json(false);

Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/EntityTemplatesController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public JsonResult Delete(long id)
7777

7878
[JsonNetFilter]
7979
[HttpPost]
80-
[ValidateAntiForgeryTokenOnPost]
80+
[ValidateAntiForgeryToken]
8181
public JsonResult Update(EntityTemplateModel entityTemplate)
8282
{
8383
using (var entityTemplateManager = new EntityTemplateManager())

Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/FormController.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2764,7 +2764,7 @@ private string storeGeneratedFilePathToContentDiscriptor(long datasetId, Dataset
27642764
/// Is called when the user write a letter in Autocomplete User Component
27652765
/// </summary>
27662766
[HttpPost]
2767-
[ValidateAntiForgeryTokenOnPost]
2767+
[ValidateAntiForgeryToken]
27682768
public ActionResult _AutoCompleteAjaxLoading(string text, long id, string type)
27692769
{
27702770
// if mapping with etities exits
@@ -3239,7 +3239,7 @@ private void validationAgainstJsonSchema()
32393239

32403240
//XX number of index des values nötig
32413241
[HttpPost]
3242-
[ValidateAntiForgeryTokenOnPost]
3242+
[ValidateAntiForgeryToken]
32433243
public ActionResult ValidateMetadataAttributeUsage(string value, int id, int parentid, string parentname, int number, int parentModelNumber, int parentStepId, long entityId)
32443244
{
32453245
//delete all white spaces from start and end
@@ -3329,7 +3329,7 @@ public ActionResult ValidateMetadataAttributeUsage(string value, int id, int par
33293329
}
33303330

33313331
[HttpPost]
3332-
[ValidateAntiForgeryTokenOnPost]
3332+
[ValidateAntiForgeryToken]
33333333
public ActionResult ValidateMetadataParameterUsage(string value, int id, long attrUsageId, int number, int parentModelNumber, int parentStepId, long entityId)
33343334
{
33353335
//delete all white spaces from start and end

Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/Hooks/AttachmentUploadController.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public JsonResult Load(long id, int version)
8989
}
9090

9191
[HttpPost]
92-
[ValidateAntiForgeryTokenOnPost]
92+
[ValidateAntiForgeryToken]
9393
public JsonResult Upload(long id)
9494
{
9595
// load edit dataset cache
@@ -161,7 +161,7 @@ public JsonResult Upload(long id)
161161
}
162162

163163
[HttpPost]
164-
[ValidateAntiForgeryTokenOnPost]
164+
[ValidateAntiForgeryToken]
165165
public JsonResult RemoveFile(long id, BExIS.UI.Hooks.Caches.FileInfo file)
166166
{
167167
// load edit dataset cache
@@ -226,7 +226,7 @@ public JsonResult RemoveFile(long id, BExIS.UI.Hooks.Caches.FileInfo file)
226226
}
227227

228228
[HttpPost]
229-
[ValidateAntiForgeryTokenOnPost]
229+
[ValidateAntiForgeryToken]
230230
public JsonResult SaveFileDescription(long id, BExIS.UI.Hooks.Caches.FileInfo file, string description)
231231
{
232232
HookManager hookManager = new HookManager();

0 commit comments

Comments
 (0)