在处理pxy_ctrl_policy回调时,仅对manipulate和block动作解析json。

This commit is contained in:
zhengchao
2019-06-11 17:03:05 +08:00
parent a396bec434
commit 77eb5505e0
2 changed files with 5 additions and 0 deletions

View File

@@ -472,6 +472,10 @@ void policy_action_param_new(int idx, const struct Maat_rule_t* rule, const char
{ {
return; return;
} }
if((unsigned char)rule->action!=PG_ACTION_MANIPULATE&&(unsigned char)rule->action!=PG_ACTION_REJECT)
{
return;
}
int rule_id; int rule_id;
cJSON *json=NULL, *rules=NULL, *item=NULL; cJSON *json=NULL, *rules=NULL, *item=NULL;
json=cJSON_Parse(srv_def_large); json=cJSON_Parse(srv_def_large);

View File

@@ -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_mutual_auth=1;
param->bypass_pinning=1; param->bypass_pinning=1;
param->mirror_client_version=1; param->mirror_client_version=1;
param->keyring=1;
item=cJSON_GetObjectItem(json, "keyring"); item=cJSON_GetObjectItem(json, "keyring");
if(item && item->type==cJSON_Number) param->keyring=item->valueint; if(item && item->type==cJSON_Number) param->keyring=item->valueint;