From b081271a88090d4e15f21a10bb1f39175eed0f69 Mon Sep 17 00:00:00 2001 From: fengweihao Date: Wed, 3 Nov 2021 18:01:57 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20TSG-8293=20=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E8=AF=B7=E6=B1=82=E5=A4=B4=E7=BC=BA?= =?UTF-8?q?=E7=9C=81=E5=85=B3=E9=94=AE=E5=AD=97=E6=AE=B5=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E9=87=8D=E5=90=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scan/src/policy_scan.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scan/src/policy_scan.cpp b/scan/src/policy_scan.cpp index a7d30cc..9d02e6f 100644 --- a/scan/src/policy_scan.cpp +++ b/scan/src/policy_scan.cpp @@ -1104,7 +1104,7 @@ size_t verify_policy_scan(enum verify_policy_type policy_type, struct verify_pol if ((protocol_field == PXY_CTRL_HTTP_REQ_HDR) || protocol_field == PXY_CTRL_HTTP_RES_HDR) { - if(query_obj->district != NULL) + if(query_obj->district != NULL && value != NULL) { const char * str_field_name = query_obj->district; scan_ret = Maat_set_scan_status(g_pangu_rt->maat[policy_type], &(ctx->scan_mid), MAAT_SET_SCAN_DISTRICT, @@ -1121,6 +1121,7 @@ size_t verify_policy_scan(enum verify_policy_type policy_type, struct verify_pol query_obj->nth_scan[0] = ctx->hit_path[ctx->n_read].Nth_scan; ctx->n_read=n_read; } + goto decide; } if(policy_type == PXY_TABLE_SECURITY &&(protocol_field == PXY_SECURITY_HTTPS_SNI || protocol_field == PXY_SECURITY_HTTP_FQDN))