From 93d3b2b3cba0c64e84fd5de02ee4b2f7ed2c5fd4 Mon Sep 17 00:00:00 2001 From: Jacob Dufault Date: Tue, 24 Oct 2017 18:09:02 -0700 Subject: [PATCH] Change whitelist behavior so it is more likely what the user wants. --- src/match.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/match.cc b/src/match.cc index c76729b4..9c830b75 100644 --- a/src/match.cc +++ b/src/match.cc @@ -61,11 +61,8 @@ GroupMatch::GroupMatch(const std::vector& whitelist, bool GroupMatch::IsMatch(const std::string& value, std::string* match_failure_reason) const { for (const Matcher& m : whitelist) { - if (!m.IsMatch(value)) { - if (match_failure_reason) - *match_failure_reason = "whitelist \"" + m.regex_string + "\""; - return false; - } + if (m.IsMatch(value)) + return true; } for (const Matcher& m : blacklist) {