tracker issue : CF-4203677

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

Illegal characters

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/DesignLimitation

Reporter/Name(from Bugbase): Alex Furey / ()

Created: 12/07/2018

Components: CFExchange

Versions: 2016

Failure Type: Usability Issue

Found In Build/Fixed In Build: 2016.0.04.302561 /

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Win 2012 Server x64

Vote Count: 0

Problem Description:
When using the "getAttachments" action of the cfexchange tag, files with names that contain illegal characters will throw an error and cannot be saved to disk.

Steps to Reproduce:
Use <cfexchange action="getAttachments" ... /> to download an attachment with a name that includes a colon, or some other illegal filename character. For example, the file I received this morning had the name "C:UsersJohnDAppDataLocalTemprmStmt_CMPNY_00.pdf" (notice the colon).

Actual Result:
An exception of type "java.nio.file.InvalidPathException" is thrown with a message like: "Illegal char <:> at index N: \\PATH\TO\FILE\INVALID:NAME.PDF"

Expected Result:
The file is written to disk without the invalid character(s) or with spaces in place of the invalid characters.

Any Workarounds:
None.

Attachments:

Comments:

Alex, What happens when you try opening / downloading that attachment with any other email client (like Outlook) running on Windows? [https://docs.microsoft.com/en-us/windows/desktop/fileio/naming-a-file]  
Comment by Piyush K.
30208 | February 08, 2019 09:54:44 AM GMT
When I download the attachment using Outlook, it saves the file to my computer without the colon in the filename.
Comment by Alex F.
30606 | April 05, 2019 03:00:44 PM GMT
I had a file like this come in today. In Outlook, it displays as "C:\Users\AbbyD\AppData\Local\Temp\rmStmt_TRUTH_00.pdf". But ColdFusion says the file name is "C:UsersAbbyDAppDataLocalTemprmStmt_TRUTH_00.pdf". ColdFusion is already stripping out the slashes but not the colon. When I save the attachment using Outlook, it saves it as "rmStmt_TRUTH_00.pdf".
Comment by Alex F.
30607 | April 05, 2019 03:28:43 PM GMT