tracker issue : CF-3853535

select a category, or use search below
(searches all categories and all time range)
Title:

cfcontent sends corrupt binary data when query string is present with CF11s isapi_redirect.dll

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Peter Boughton / Peter Boughton (Peter Boughton)

Created: 11/18/2014

Components: Web Container (Tomcat)

Versions: 11.0

Failure Type: Data Corruption

Found In Build/Fixed In Build: CF11_Final / CF11 Update5

Priority/Frequency: Critical / All users will encounter

Locale/System: ALL / Win All

Vote Count: 1

Listed in the version 11.0.05.293506 Issues Fixed doc
# Problem Description
CF11 connected to IIS 7.5 and standard URL rewriting

When using cfcontent to send a non-public binary file (e.g. image or pdf), the presence of a query string in the URL will cause CF to send a corrupt file that only has the relevant header, but has different content.

Switching C:\ColdFusion11\config\wsconfig\1\isapi_redirect.dll with the version from CF10 and restarting CF/IIS causes the problem to go away.

Further information available: https://groups.google.com/forum/#!topic/coldbox/CYoeeZlmjJg

# Steps to Reproduce:
getjelly.cfm
<cfcontent type="image/jpg" file=#expandPath('./Jellyfish.jpg')# /><cfabort/>

web.config rewrite rule:
                <rule name="jelly" patternSyntax="ExactMatch" stopProcessing="true">
                    <match url="jelly" />
                    <action type="Rewrite" url="getjelly.cfm" appendQueryString="true" logRewrittenUrl="true" />
                </rule>

Browse to localhost/getjelly.cfm and the image displays.
Browse to localhost/jelly and the image displays.
Browse to localhost/jelly?nocache=12345 and the image fails.

# Actual Result:
A corrupted file of the appropriate type (i.e. a jpg file has the JPEG magic number, a PDF file has a PDF header)

# Expected Result:
The correct file should always be returned; the presence of a query string should not affect this.

# Any Workarounds:
* Use CF10's isapi_redirect.dll

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3853535

External Customer Info:
External Company:  
External Customer Name: boughtonp
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

Please explain in 25 characters or more how this bug impacts productivity and why you are adding a vote.
Vote by External U.
10028 | November 18, 2014 10:12:11 AM GMT
The fix for this bug is available in the pre-release build of ColdFusion 11 Update 5
Comment by CFwatson U.
10024 | February 20, 2015 09:29:24 AM GMT
Verified this is fixed in CF11 Update 5 (build 11,0,05,293506). Thanks!, -Aaron
Comment by External U.
10025 | October 09, 2015 10:32:07 PM GMT
To clarify, I've confirmed the expected behavior in CF11 Update 5. However, I also saw the expected behavior (correct file and size) in CF 11 Update 4 (build 11,0,04,293328 w/ isapi_redirect.dll v1.2.40) w/ IIS 8.5 and URL Rewrite 2 using a query string w/ the code and rewrite rule from the description and Firefox v40. Hopefully others can confirm it was fixed. Thanks!, -Aaron
Comment by External U.
10026 | October 09, 2015 11:06:03 PM GMT
We are still seeing this issue in CF11 update 7 using the latest isapi connector.
Comment by External U.
10027 | March 02, 2016 06:16:04 PM GMT