You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/07/11 05:49:35 UTC

[GitHub] [nifi-minifi-cpp] adamdebreceni commented on a diff in pull request #1362: MINIFICPP-1830 Verify regex properties in processors in case it is set to empty

adamdebreceni commented on code in PR #1362:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1362#discussion_r917561799


##########
extensions/civetweb/processors/ListenHTTP.cpp:
##########
@@ -108,10 +108,12 @@ void ListenHTTP::onSchedule(core::ProcessContext *context, core::ProcessSessionF
 
   bool randomPort = listeningPort == "0";
 
-  std::string authDNPattern;
+  std::string authDNPattern = ".*";
 
   if (context->getProperty(AuthorizedDNPattern.getName(), authDNPattern) && !authDNPattern.empty()) {
     logger_->log_debug("ListenHTTP using %s: %s", AuthorizedDNPattern.getName(), authDNPattern);
+  } else {
+    logger_->log_debug("Authorized DN Pattern not set or invalid, using default '%s' pattern", authDNPattern);

Review Comment:
   shouldn't we set `authDNPattern` here to the default `".*"`? I think the property could contain the empty string value and overwrite the default at line 113



-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org