]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3170] Addressed comments
authorFrancis Dupont <fdupont@isc.org>
Tue, 11 Jun 2024 14:12:24 +0000 (16:12 +0200)
committerFrancis Dupont <fdupont@isc.org>
Tue, 11 Jun 2024 14:35:08 +0000 (16:35 +0200)
ChangeLog
doc/sphinx/arm/classify.rst
src/lib/eval/eval_messages.mes
src/lib/eval/tests/token_unittest.cc
src/lib/eval/token.h

index 85efeb9519043d2cc2272d74c17a2c8e0d1070ee..ea81c86098286e59930596a101903660728595cd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,6 @@
 2253.  [func]          fdupont
        Added the predicate token "match" which evaluates regular
-       expression matching.
+       expression matching to classification expression.
        (Gitlab #3170)
 
 2252.  [bug]           fdupont
index a32fbbe4836fe1ff5e0b5a93fb0f866883819bd5..4b167ccf6b1005b95c5a98d35297faabe2747908 100644 (file)
@@ -585,7 +585,7 @@ So inequality, case insensitive pattern matching or pattern search.
 
    Detected invalid regular expressions are considered as syntax errors,
    runtime exceptions during match are handled as no match.
-   Be careful with the match operator as it can show extremely bad
+   Be careful with the match operator as it can result in very poor
    performance leading to regular expression denial of service (ReDoS).
 
 
index 1c62431c5160eebdfbbe6cd3fd4467a64d37fc6f..ec31028540c9bf4a025493c85ab753db6f5437d6 100644 (file)
@@ -91,8 +91,8 @@ This debug message indicates that the given regular expression was matched
 with the popped value. The result was pushed onto the value stack.
 
 % EVAL_DEBUG_MATCH_ERROR Matching '%1' on %2 raised an error: %3
-This error message indicates that the given regular expression was matched
-with the popped value. An error was raised.
+This error message indicates that an error occurred while evaluating the given
+regular expression against the popped value.
 
 # For use with TokenMember
 
index cfadbc03189c33ad867063c1ea8b5dfdaabe8f2d..2b87ef8ac01cfa16bdadaba63a57697529b4c771 100644 (file)
@@ -553,7 +553,7 @@ public:
     ///
     /// @param reg_exp regular expression
     /// @param value value to match
-    /// @param matched true or false
+    /// @param matched expected outcome of the match
     void testMatch(const std::string& reg_exp, const std::string& value,
                    bool matched) {
         clearStack();
index 43fe29217598bc9e1453e473ca41e034775a8035..b37a9867d57457fc4bcb3577df4c035e6c97f3d9 100644 (file)
@@ -1338,7 +1338,8 @@ public:
     /// @brief Match regular expression
     ///
     /// Evaluation uses only the last parameter (top of stack) which is popped.
-    /// "true" when the regular expression or "false" otherwise is pushed.
+    /// Pushes "true" when the regular expression evaluates to true,
+    /// pushes "false" otherwise.
     ///
     /// @param pkt (unused)
     /// @param values - stack of values (1 popped, 1 pushed)