修复加载8个字符串与表达式报错的bug TSG-4717;增加Hierarchy日志中输出去重后Clause的数量。
This commit is contained in:
@@ -1906,47 +1906,72 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"compile_id": 180,
|
||||
"service": 0,
|
||||
"action": 0,
|
||||
"do_blacklist": 0,
|
||||
"do_log": 0,
|
||||
"effective_rage": 0,
|
||||
"user_region": "Hierarchy_VirtualWithTwoPhysical",
|
||||
"is_valid": "yes",
|
||||
"groups": [
|
||||
{
|
||||
"group_name":"FQDN_OBJ1",
|
||||
"virtual_table":"VIRTUAL_SSL_SNI",
|
||||
"not_flag" : 0,
|
||||
"clause_index":0
|
||||
},
|
||||
{
|
||||
"group_name":"FQDN_CAT1",
|
||||
"virtual_table":"VIRTUAL_SSL_SNI",
|
||||
"not_flag" : 0,
|
||||
"clause_index":0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"compile_id": 181,
|
||||
"service": 0,
|
||||
"action": 0,
|
||||
"do_blacklist": 0,
|
||||
"do_log": 0,
|
||||
"effective_rage": 0,
|
||||
"user_region": "ipv4_composition.match",
|
||||
"is_valid": "yes",
|
||||
"groups": [
|
||||
{
|
||||
"group_name":"IPv4-composition-source-only",
|
||||
"virtual_table":"COMPOSITION_IP_SOURCE",
|
||||
"not_flag":0
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"compile_id": 180,
|
||||
"service": 0,
|
||||
"action": 0,
|
||||
"do_blacklist": 0,
|
||||
"do_log": 0,
|
||||
"effective_rage": 0,
|
||||
"user_region": "Hierarchy_VirtualWithTwoPhysical",
|
||||
"is_valid": "yes",
|
||||
"groups": [
|
||||
{
|
||||
"group_name":"FQDN_OBJ1",
|
||||
"virtual_table":"VIRTUAL_SSL_SNI",
|
||||
"not_flag" : 0,
|
||||
"clause_index":0
|
||||
},
|
||||
{
|
||||
"group_name":"FQDN_CAT1",
|
||||
"virtual_table":"VIRTUAL_SSL_SNI",
|
||||
"not_flag" : 0,
|
||||
"clause_index":0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"compile_id": 181,
|
||||
"service": 0,
|
||||
"action": 0,
|
||||
"do_blacklist": 0,
|
||||
"do_log": 0,
|
||||
"effective_rage": 0,
|
||||
"user_region": "ipv4_composition.match",
|
||||
"is_valid": "yes",
|
||||
"groups": [
|
||||
{
|
||||
"group_name":"IPv4-composition-source-only",
|
||||
"virtual_table":"COMPOSITION_IP_SOURCE",
|
||||
"not_flag":0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"compile_id": 182,
|
||||
"service": 1,
|
||||
"action": 1,
|
||||
"do_blacklist": 1,
|
||||
"do_log": 1,
|
||||
"user_region": "8-expr",
|
||||
"is_valid": "yes",
|
||||
"groups": [
|
||||
{
|
||||
"regions": [
|
||||
{
|
||||
"table_name": "KEYWORDS_TABLE",
|
||||
"table_type": "string",
|
||||
"table_content": {
|
||||
"keywords": "string1&string2&string3&string4&string5&string6&string7&string8",
|
||||
"expr_type": "and",
|
||||
"match_method": "expr",
|
||||
"format": "uncase plain"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"plugin_table": [
|
||||
{
|
||||
|
||||
@@ -1305,6 +1305,28 @@ TEST(StringScan, MaatUnescape)
|
||||
|
||||
return;
|
||||
}
|
||||
TEST(StringScan, Expr8)
|
||||
{
|
||||
int ret=0;
|
||||
int table_id=0;
|
||||
struct Maat_rule_t result[4];
|
||||
const char* scan_data="string1, string2, string3, string4, string5, string6, string7, string8";
|
||||
const char* table_name="KEYWORDS_TABLE";
|
||||
scan_status_t mid=NULL;
|
||||
|
||||
table_id=Maat_table_register(g_feather,table_name);
|
||||
ASSERT_GT(table_id, 0);
|
||||
|
||||
ret=Maat_full_scan_string(g_feather, table_id, CHARSET_GBK, scan_data, strlen(scan_data),
|
||||
result, NULL, 4,
|
||||
&mid, 0);
|
||||
EXPECT_EQ(ret, 1);
|
||||
EXPECT_EQ(result[0].config_id, 182);
|
||||
Maat_clean_status(&mid);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
TEST(StringScan, StreamInput)
|
||||
{
|
||||
int table_id=0,ret=0;
|
||||
|
||||
Reference in New Issue
Block a user