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 2021/03/03 21:29:33 UTC

[GitHub] [nifi] ChrisSamo632 commented on a change in pull request #4854: NIFI-7172: Trim whitespace from NiFi properties

ChrisSamo632 commented on a change in pull request #4854:
URL: https://github.com/apache/nifi/pull/4854#discussion_r586803028



##########
File path: nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-properties-loader/src/main/java/org/apache/nifi/properties/NiFiPropertiesLoader.java
##########
@@ -174,6 +177,18 @@ ProtectedNiFiProperties readProtectedPropertiesFromDisk(File file) {
             rawProperties.load(inStream);
             logger.info("Loaded {} properties from {}", rawProperties.size(), file.getAbsolutePath());
 
+            // Trim whitespace from each property. If property is multi-line, remove anything after the first line break.

Review comment:
       Should we allow for whitespace at the start/end of properties if the user wants it (e.g. a password)? So either a flag (in the properties) to enable/disable the whitespace trimming or an escape/quote megabits,  e.g. `"foo "` would retain the trailing whitespace but not the quotes?
   
   Suspect this is somewhat of an edge case but always running whitespace can lead to frustrations




----------------------------------------------------------------
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.

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