Skip to content

Commit 43b95ca

Browse files
committed
#2177 remove tokens from form, and check if token cookie is available
1 parent 60b30c1 commit 43b95ca

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Components/App/BExIS.App.Bootstrap/Attributes/CustomValidateAntiForgeryToken.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ public void OnAuthorization(AuthorizationContext filterContext)
2424
formToken = request.Headers["__RequestVerificationToken"];
2525
}
2626

27-
AntiForgery.Validate(cookieToken, formToken);
27+
if (cookieToken != null)
28+
{
29+
AntiForgery.Validate(cookieToken, formToken);
30+
}
31+
2832
//AntiForgery.Validate();
2933
}
3034
}

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2767,7 +2767,6 @@ private string storeGeneratedFilePathToContentDiscriptor(long datasetId, Dataset
27672767
/// Is called when the user write a letter in Autocomplete User Component
27682768
/// </summary>
27692769
[HttpPost]
2770-
[CustomValidateAntiForgeryToken]
27712770
public ActionResult _AutoCompleteAjaxLoading(string text, long id, string type)
27722771
{
27732772
// if mapping with etities exits
@@ -3247,7 +3246,6 @@ private void validationAgainstJsonSchema()
32473246

32483247
//XX number of index des values nötig
32493248
[HttpPost]
3250-
[CustomValidateAntiForgeryToken]
32513249
public ActionResult ValidateMetadataAttributeUsage(string value, int id, int parentid, string parentname, int number, int parentModelNumber, int parentStepId, long entityId)
32523250
{
32533251
//delete all white spaces from start and end
@@ -3337,7 +3335,6 @@ public ActionResult ValidateMetadataAttributeUsage(string value, int id, int par
33373335
}
33383336

33393337
[HttpPost]
3340-
[CustomValidateAntiForgeryToken]
33413338
public ActionResult ValidateMetadataParameterUsage(string value, int id, long attrUsageId, int number, int parentModelNumber, int parentStepId, long entityId)
33423339
{
33433340
//delete all white spaces from start and end

0 commit comments

Comments
 (0)