-
Notifications
You must be signed in to change notification settings - Fork 608
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
security: change command line embedding for oiiotool & maketx output
It was pointed out that oiiotool and maketx's habit of embedding their exact command line arguments in the Software and ImageHistory metadata of output images was potentially problematic in that it might inadvertently leak important internal data (for example, file paths may reveal secret projects, etc.). This patch changes the behavior of oiiotool and maketx as follows: * The default behavior is now to use `"OpenImageIO <version> <hash>"` where `<hash>` is the SHA-1 hash of the command line arguments (which allows you to tell if two files use the same command line args, but doesn't let you know what they were). * A new `--history` argument (or setting OIIOTOOL_METADATA_HISTORY env variable to a nonzero integer) instead uses the full command line arguments with no obfuscation. (This used to be the default behavior but is now deemed unsafe.) When the env variable is in effect, a `--no-history` argument explicitly disables it. * For oiiotool, the existing `--nosoftwareattrib`, as before, causes the Software and ImageHistory metadata to not be modified at all. Here is an example of the behavior: ``` $ oiiotool tmp.tif -o tmp.exr && iinfo -v tmp.exr tmp.exr : 640 x 480, 3 channel, half openexr channel list: R, G, B Software: "OpenImageIO 2.6.2.0dev : B897973B86EC13E3F1858AAE5E057EFCCF99889A" ... $ oiiotool --history tmp.tif -o tmp.exr && iinfo -v tmp.exr tmp.exr : 640 x 480, 3 channel, half openexr channel list: R, G, B Software: "OpenImageIO 2.6.2.0dev : oiiotool --history tmp.tif -o tmp.exr" Exif:ImageHistory: "oiiotool --history tmp.tif -o tmp.exr" ... ``` Signed-off-by: Larry Gritz <lg@larrygritz.com>
- Loading branch information
Showing
8 changed files
with
93 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters