#2576: 202 Invalid File Type uploading SWF to ColdFusion
--------------------------------------------------------+-------------------
Reporter: bobhendren | Owner:
Type: Bug | Status: new
Priority: Normal | Milestone:
Component: Server : ColdFusion | Version:
FCKeditor 2.6.3
Keywords: Coldfusion, invalid file type, upload, swf |
--------------------------------------------------------+-------------------
The cf_util.cfm file under the ColdFusion connector is incorrect trying to
check SWF files as an image. The CFFUNCTION is:
{{{
<cffunction name="IsImageValid" returntype="boolean" output="true">
<cfargument name="filePath" required="true" type="String">
<cfargument name="extension" required="true" type="String">
<cfset var imageCFC = "">
<cfset var imageInfo = "">
<!---
<cfif not
ListFindNoCase("gif,jpeg,jpg,png,swf,psd,bmp,iff,tiff,tif,swc,jpc,jp2,jpx,jb2,xmb,wbmp",
ARGUMENTS.extension)>
<cfreturn true>
</cfif>
--->
<cfif not
ListFindNoCase("gif,jpeg,jpg,png,psd,bmp,iff,tiff,tif,swc,jpc,jp2,jpx,jb2,xmb,wbmp",
ARGUMENTS.extension)>
<cfreturn true>
</cfif>
<cftry>
<cfif REQUEST.CFVersion gte 8>
<cfset objImage = ImageRead(ARGUMENTS.filePath) >
<cfset imageInfo = ImageInfo(objImage)>
<!--- <cfimage action="info"
source="#ARGUMENTS.filePath#" structName="imageInfo" /> --->
<cfelse>
<cfset imageCFC = createObject("component",
"image")>
<cfset imageInfo = imageCFC.getImageInfo("",
ARGUMENTS.filePath)>
</cfif>
<cfif imageInfo.height lte 0 or imageInfo.width lte 0>
<cfreturn false>
</cfif>
<cfcatch type="any">
<cfreturn false>
</cfcatch>
</cftry>
<cfreturn true>
</cffunction>
}}}
I've commented out the old code and modified, which then worked for me.
--
Ticket URL: <http://dev.fckeditor.net/ticket/2576>
FCKeditor <http://www.fckeditor.net/>
The text editor for Internet
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac