mirror of https://github.com/Icinga/icinga2.git
Merge pull request #6498 from Icinga/bugfix/match-regex-match-any-regression
Fix regression with MatchAny false conditions on match/regex/cidr_match
This commit is contained in:
commit
2e3a1ff0c6
|
@ -151,7 +151,8 @@ bool ScriptUtils::Regex(const std::vector<Value>& args)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
/* MatchAny: Nothing matched. MatchAll: Everything matched. */
|
||||||
|
return mode == MatchAll;
|
||||||
} else {
|
} else {
|
||||||
String text = argTexts;
|
String text = argTexts;
|
||||||
boost::smatch what;
|
boost::smatch what;
|
||||||
|
@ -197,7 +198,8 @@ bool ScriptUtils::Match(const std::vector<Value>& args)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
/* MatchAny: Nothing matched. MatchAll: Everything matched. */
|
||||||
|
return mode == MatchAll;
|
||||||
} else {
|
} else {
|
||||||
String text = argTexts;
|
String text = argTexts;
|
||||||
return Utility::Match(pattern, argTexts);
|
return Utility::Match(pattern, argTexts);
|
||||||
|
@ -242,7 +244,8 @@ bool ScriptUtils::CidrMatch(const std::vector<Value>& args)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
/* MatchAny: Nothing matched. MatchAll: Everything matched. */
|
||||||
|
return mode == MatchAll;
|
||||||
} else {
|
} else {
|
||||||
String ip = argIps;
|
String ip = argIps;
|
||||||
return Utility::CidrMatch(pattern, ip);
|
return Utility::CidrMatch(pattern, ip);
|
||||||
|
|
Loading…
Reference in New Issue