Commit fc06304e authored by Eric's avatar Eric

[update] fix regexp match bug

parent 9cf8771b
......@@ -332,7 +332,11 @@ func (sf *SystemUserFilterRule) Pattern() *regexp.Regexp {
}
func (sf *SystemUserFilterRule) Match(cmd string) (RuleAction, string) {
found := sf.Pattern().FindString(cmd)
pattern := sf.Pattern()
if pattern == nil{
return ActionUnknown, ""
}
found := pattern.FindString(cmd)
if found == "" {
return ActionUnknown, ""
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment