Opened 15 years ago

Closed 12 years ago

#2576 closed Bug (invalid)

202 Invalid File Type uploading SWF to ColdFusion

Reported by: Bob Hendren Owned by:
Priority: Normal Milestone:
Component: Server : ColdFusion Version: FCKeditor 2.6.3
Keywords: Cc:

Description

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.

Change History (2)

comment:1 Changed 15 years ago by Artur Formella

Keywords: Coldfusion invalid file type upload swf removed

comment:2 Changed 12 years ago by Jakub Ś

Resolution: invalid
Status: newclosed

FCKeditor was retired and is no longer supported. All active development was moved to its successor, CKEditor 3.x, that is a fully mature and far superior product. We recommend you upgrade as soon as possible since this issue is no longer a problem in current code base.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy