在处理pxy_ctrl_policy回调时,仅对manipulate和block动作解析json。
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user