Title:
[ANeff] Bug for: imageWrite applies temp directory permissions in some cases
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/Fixed
Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)
Created: 07/22/2016
Components: CFIMAGE
Versions: 2016,11.0,2018
Failure Type:
Found In Build/Fixed In Build: CF2016_Update2 / 313274
Priority/Frequency: Major / Some users will encounter
Locale/System: English / Win All
Vote Count: 2
imageWrite applies temp directory permissions in some cases
Steps to Reproduce:
--------------------------------------------
1) unzip attached ImageWriteAppliesTempDirectoryPermissions.zip
2) run index.cfm
3) see* foo2.jpg's Windows file permissions are same as parent folder's permissions (good)
4) run index.cfm?filename=bar
5) see* bar2.jpg's Windows file permissions are same as CF's temp directory's permissions (bad)
* - to see Windows file permissions, right-click the file and choose Properties and click "Security" tab
Actual result: see #3 and #5
Expected result (and actual result in CF11): images created by imageWrite() always inherit permissions from parent directory (not from CF's temp directory)
Reproduced the issue on Windows 2008 and Windows 2012 R2 w/ CF2016 Enterprise Final, CF2016 Enterprise Update 1 and CF2016 Enterprise Update 2 with and without Lockdown Guide steps applied.
Unable to reproduce the issue on Windows 10. Tried on two Windows 10 machines w/ CF2016 Developer Edition Update 1 and Update 2 and always got expected results.
index.cfm
--------------------------------------------
<cfscript>
fileName = (URL.keyExists("fileName") and listFindNoCase("foo,bar", URL.fileName)) ? URL.fileName : "foo";
myImage = imageRead(expandPath("./#variables.filename#.jpg"));
imageWrite(myImage, expandPath("./#variables.filename#2.jpg"), 1, true);
</cfscript>
Possibly related to 3114274.
Note: foo.jpg was edited in Photoshop. bar.jpg is from Google image search. Issue possibly caused by corrupted metadata?
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4175138
Reason: PRNeedInfo
External Customer Info:
External Company:
External Customer Name: Aaron Neff
External Customer Email:
Attachments:
- July 23, 2016 00:00:00: 1_ImageWriteAppliesTempDirectoryPermissions.zip
- August 18, 2016 00:00:00: 2_Metadata_Bar.png
- August 18, 2016 00:00:00: 3_Metadata_Foo.png
Comments: