Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Reto Aeberli / Reto Aeberli (Reto Aeberli)
Created: 08/05/2014
Components: Core Runtime
Versions: 11.0
Failure Type:
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Major / Some users will encounter
Locale/System: ALL / Win 2012 Server x64
Vote Count: 0
Problem Description:
Using setEncoding for form breaks cffile action=uploadall when empty file fields are submitted.
This code works fine on ColdFusion 9, it looks that the fix for bug 3131246 introduced this problem. According to Sanjeev Kumar "setencoding() parses all the form fields again." This should be changed and empty formfields should not be parsed.
Steps to Reproduce:
Put the following code into a cfm file and call it in the browser. Don't select a file and submit the form.
<cfset setEncoding('form', 'UTF-8')>
<cfif cgi.request_method eq 'post'>
<cffile action="uploadall" destination="#expandPath('.')#" nameconflict="makeunique" result="uploadResult">
<cfdump var="#uploadResult#">
</cfif>
<form action="" method="post" enctype="multipart/form-data">
<input type="text" name="text" value="some text"><br>
<input type="file" name="file1"><br>
<input type="file" name="file2"><br>
<input type="submit"><br>
</form>
Actual Result:
Error: No data was received in the uploaded file
Expected Result:
Dump of uploaded files, with no file selected an empty array should displayed.
Any Workarounds:
Comment out the setEncoding and it works.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3800047
External Customer Info:
External Company:
External Customer Name: Reto CENTINATED GmbH
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
Comments: