From bcf016e20f9189ac34cf7ca78a464e543b171e09 Mon Sep 17 00:00:00 2001 From: Rohit Myali Date: Tue, 13 Aug 2024 12:15:51 +0530 Subject: [PATCH] Updated delete method with supported query-parameters in url Signed-off-by: Rohit Myali --- ...trixadc_appfwprofile_crosssitescripting_binding.go | 11 +++++++++++ ...dc_appfwprofile_crosssitescripting_binding_test.go | 3 +++ 2 files changed, 14 insertions(+) diff --git a/citrixadc/resource_citrixadc_appfwprofile_crosssitescripting_binding.go b/citrixadc/resource_citrixadc_appfwprofile_crosssitescripting_binding.go index 4bda9fab4..c3285d7f7 100644 --- a/citrixadc/resource_citrixadc_appfwprofile_crosssitescripting_binding.go +++ b/citrixadc/resource_citrixadc_appfwprofile_crosssitescripting_binding.go @@ -208,6 +208,17 @@ func deleteAppfwprofile_crosssitescripting_bindingFunc(d *schema.ResourceData, m args["crosssitescripting"] = crosssitescripting args["formactionurl_xss"] = url.QueryEscape(d.Get("formactionurl_xss").(string)) args["as_scan_location_xss"] = d.Get("as_scan_location_xss").(string) + + if val, ok := d.GetOk("as_value_type_xss"); ok { + args["as_value_type_xss"] = url.QueryEscape(val.(string)) + } + if val, ok := d.GetOk("as_value_expr_xss"); ok { + args["as_value_expr_xss"] = url.QueryEscape(val.(string)) + } + if val, ok := d.GetOk("ruletype"); ok { + args["ruletype"] = url.QueryEscape(val.(string)) + } + err := client.DeleteResourceWithArgsMap(service.Appfwprofile_crosssitescripting_binding.Type(), appFwName, args) if err != nil { return err diff --git a/citrixadc/resource_citrixadc_appfwprofile_crosssitescripting_binding_test.go b/citrixadc/resource_citrixadc_appfwprofile_crosssitescripting_binding_test.go index 5fef4f0de..874a1ec9a 100644 --- a/citrixadc/resource_citrixadc_appfwprofile_crosssitescripting_binding_test.go +++ b/citrixadc/resource_citrixadc_appfwprofile_crosssitescripting_binding_test.go @@ -36,6 +36,9 @@ resource citrixadc_appfwprofile_crosssitescripting_binding demo_binding { isregex_xss = "NOTREGEX" comment = "democomment" state = "ENABLED" + as_value_type_xss = "Attribute" + as_value_expr_xss = "value" + isvalueregex_xss = "NOTREGEX" } resource citrixadc_appfwprofile demo_appfw {