1、白名单、防护对象文件导入部分属性没有忽略
2、白名单匹配sql错误bug修复
This commit is contained in:
@@ -424,9 +424,9 @@
|
||||
from t_white_list
|
||||
<where>
|
||||
<foreach collection="taskCommandInfos" item="command" open="(" separator=" or " close=")">
|
||||
|
||||
false
|
||||
<if test="command.fiveTupleWithMask.sourceIP != null and command.fiveTupleWithMask.maskSourceIP == null">
|
||||
(white_list_ip = INET_ATON(#{command.fiveTupleWithMask.sourceIP})
|
||||
or (white_list_ip = INET_ATON(#{command.fiveTupleWithMask.sourceIP})
|
||||
<if test="command.fiveTupleWithMask.sourcePort != null">
|
||||
and white_list_port = CAST(#{command.fiveTupleWithMask.sourcePort} AS UNSIGNED)
|
||||
</if>
|
||||
@@ -436,7 +436,7 @@
|
||||
)
|
||||
</if>
|
||||
<if test="command.fiveTupleWithMask.sourceIP != null and command.fiveTupleWithMask.maskSourceIP != null">
|
||||
(( white_list_ip & INET_ATON(#{command.fiveTupleWithMask.maskSourceIP})) =
|
||||
or (( white_list_ip & INET_ATON(#{command.fiveTupleWithMask.maskSourceIP})) =
|
||||
(INET_ATON(#{command.fiveTupleWithMask.sourceIP}) & INET_ATON(#{command.fiveTupleWithMask.maskSourceIP}))
|
||||
<if test="command.fiveTupleWithMask.sourcePort != null">
|
||||
and white_list_port = CAST(#{command.fiveTupleWithMask.sourcePort} AS UNSIGNED)
|
||||
@@ -479,9 +479,11 @@
|
||||
select *, INET_NTOA(white_list_ip) as white_list_ip_d
|
||||
from t_white_list
|
||||
<where>
|
||||
|
||||
<foreach collection="staticRuleObjects" item="staticRule" open="(" separator=" or " close=")">
|
||||
false
|
||||
<if test="staticRule.staticRuleSip != null and staticRule.staticRuleMsip == null">
|
||||
(white_list_ip = INET_ATON(#{staticRule.staticRuleSip})
|
||||
or(white_list_ip = INET_ATON(#{staticRule.staticRuleSip})
|
||||
<if test="staticRule.staticRuleSport != null">
|
||||
and white_list_port = #{staticRule.staticRuleSport}
|
||||
</if>
|
||||
@@ -491,7 +493,7 @@
|
||||
)
|
||||
</if>
|
||||
<if test="staticRule.staticRuleSip != null and staticRule.staticRuleMsip != null">
|
||||
(( white_list_ip & INET_ATON(#{staticRule.staticRuleSip})) =
|
||||
or(( white_list_ip & INET_ATON(#{staticRule.staticRuleSip})) =
|
||||
(INET_ATON(#{staticRule.staticRuleSip}) & INET_ATON(#{staticRule.staticRuleMsip}))
|
||||
<if test="staticRule.staticRuleSport != null">
|
||||
and white_list_port = #{staticRule.staticRuleSport}
|
||||
|
||||
Reference in New Issue
Block a user