cmcfarlen commented on code in PR #9134:
URL: https://github.com/apache/trafficserver/pull/9134#discussion_r992787760


##########
plugins/experimental/maxmind_acl/mmdb.cc:
##########
@@ -694,19 +740,39 @@ Acl::eval_country(MMDB_entry_data_s *entry_data, const 
char *path, int path_len)
     ret = true;
   }
 
+  // test for path regex
   if (nullptr != path && 0 != path_len) {
-    if (!allow_regex[output].empty()) {
-      for (auto &i : allow_regex[output]) {
+    if (!allow_regex_path[output].empty()) {
+      for (auto &i : allow_regex_path[output]) {
         if (PCRE_ERROR_NOMATCH != pcre_exec(i._rex, i._extra, path, path_len, 
0, PCRE_NOTEMPTY, nullptr, 0)) {
-          TSDebug(PLUGIN_NAME, "Got a regex allow hit on regex: %s, country: 
%s", i._regex_s.c_str(), output);
+          TSDebug(PLUGIN_NAME, "Got a regex allow hit on regex path: %s, 
country: %s", i._regex_s.c_str(), output);
           ret = true;
         }
       }
     }
-    if (!deny_regex[output].empty()) {
-      for (auto &i : deny_regex[output]) {
+    if (!deny_regex_path[output].empty()) {
+      for (auto &i : deny_regex_path[output]) {
         if (PCRE_ERROR_NOMATCH != pcre_exec(i._rex, i._extra, path, path_len, 
0, PCRE_NOTEMPTY, nullptr, 0)) {
-          TSDebug(PLUGIN_NAME, "Got a regex deny hit on regex: %s, country: 
%s", i._regex_s.c_str(), output);
+          TSDebug(PLUGIN_NAME, "Got a regex deny hit on regex path: %s, 
country: %s", i._regex_s.c_str(), output);
+          ret = false;

Review Comment:
   If this is denied due to regex_path, should this skip the allow_regex_host 
check below?  There needs to be some precedence here since there are now two 
ways to both allow and deny.  Whatever is decided should be documented as well.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to