Prevent overlays from being improperly used as format strings

`wwctl overlay show --render` shows the rendered overlay with
`wwlog.Info`, but that caused it to be processed as a format string.
This passes an explicit format string first, and then includes the
rendered overlay as a variable to the formatter.

- Fixes #1363

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2024-09-05 17:16:48 -06:00
committed by Christian Goll
parent 7cc6258768
commit f39972f917
2 changed files with 2 additions and 1 deletions

View File

@@ -55,6 +55,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Fixed
- Fixed application of node overlays such that they override overlapping files from profile overlays. #1259
- Prevent overlays from being improperly used as format strings during `wwctl overlay show --render`. #1363
## v4.5.6, 2024-08-05

View File

@@ -113,7 +113,7 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
wwlog.Info("backupFile: %v\nwriteFile: %v", backupFile, writeFile)
wwlog.Info("Filename: %s\n", destFileName)
}
wwlog.Info(outBuffer.String())
wwlog.Info("%s", outBuffer.String())
}
return nil
}