From 77eb5505e0fc058f48504e4defc8727ed01d83e6 Mon Sep 17 00:00:00 2001 From: zhengchao Date: Tue, 11 Jun 2019 17:03:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E5=A4=84=E7=90=86pxy=5Fctrl=5Fpolicy?= =?UTF-8?q?=E5=9B=9E=E8=B0=83=E6=97=B6=EF=BC=8C=E4=BB=85=E5=AF=B9manipulat?= =?UTF-8?q?e=E5=92=8Cblock=E5=8A=A8=E4=BD=9C=E8=A7=A3=E6=9E=90json?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/business/pangu-http/src/pangu_http.cpp | 4 ++++ plugin/business/ssl-policy/src/ssl_policy.cpp | 1 + 2 files changed, 5 insertions(+) diff --git a/plugin/business/pangu-http/src/pangu_http.cpp b/plugin/business/pangu-http/src/pangu_http.cpp index f436dd9..e1a581e 100644 --- a/plugin/business/pangu-http/src/pangu_http.cpp +++ b/plugin/business/pangu-http/src/pangu_http.cpp @@ -472,6 +472,10 @@ void policy_action_param_new(int idx, const struct Maat_rule_t* rule, const char { return; } + if((unsigned char)rule->action!=PG_ACTION_MANIPULATE&&(unsigned char)rule->action!=PG_ACTION_REJECT) + { + return; + } int rule_id; cJSON *json=NULL, *rules=NULL, *item=NULL; json=cJSON_Parse(srv_def_large); diff --git a/plugin/business/ssl-policy/src/ssl_policy.cpp b/plugin/business/ssl-policy/src/ssl_policy.cpp index 0448fd8..64b14d2 100644 --- a/plugin/business/ssl-policy/src/ssl_policy.cpp +++ b/plugin/business/ssl-policy/src/ssl_policy.cpp @@ -78,6 +78,7 @@ void intercept_param_new_cb(int table_id, const char* key, const char* table_lin param->bypass_mutual_auth=1; param->bypass_pinning=1; param->mirror_client_version=1; + param->keyring=1; item=cJSON_GetObjectItem(json, "keyring"); if(item && item->type==cJSON_Number) param->keyring=item->valueint;