Exporting to TIFF saves the file location into the file's metadata
GIMP version: 2.10.12
Operating System: Windows 7
Package: Installer from gimp.org
Description of the bug
When exporting images as TIFF files, the file location is written into the TIFF's DocumentName field (Tag 269/010Dh). This occurs when creating a new TIFF image or modifying an existing one. When modifying an existing file which already has a DocumentName field, the existing value seems to be overwritten with the new file location.
File locations can contain confidential information such as usernames and directory structures, making this behaviour a potential privacy and security issue. Additionally, any existing DocumentName information may be lost when editing with GIMP.
Reproduction
Is the bug reproducible? Always.
Reproduction steps:
- Create an image in GIMP
- Select File > Export As...
- Change the file name extension to ".tif"
- Finish exporting using the default settings
- Use an application such as AsTiffTagViewer to inspect the new file's TIFF tags
- Observe the value of the DocumentName property
Expected result:
According to the TIFF specifications the DocumentName field is intended to contain "the name of the document from which this image was scanned", if provided. Since that information wasn't provided, I would expect DocumentName not to exist.
Actual result:
The DocumentName field is automatically created and populated with the location of the saved file.