Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Cannot Reproduce
-
fileinstall-3.6.0
-
None
-
None
Description
FileInstall allows substitution characters to be escaped so they are kept as-is when read from a configuration file and in memory. So, for the following configuration file property:
property = $\{value\}
The following key/value pair will be present in memory:
property, ${value}
This works well unless FileInstall is configured to write the configurations back to disk (felix.fileinstall.enableConfigSave=true). In that case, the value is written back to the file as-is, i.e., without the escape characters:
property = ${value}
At that point, if the file needs to be read back in (e.g., content or time stamp of the file changes), substitution will occurs since the substitution characters were not escaped when the value was written back out to the file.
Since the only way for the substitution characters to be present in memory inside a value is if they have been previously escaped when the file was read in, then they should also be escaped when written back out so they remain unchanged if they ever need to be read in again.