tracker issue : CF-3526880

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

cfimport doesn't resolve /../ correctly in cf10. It did in cf9

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/NotABug

Reporter/Name(from Bugbase): Doug Cain / Doug Cain (Doug Cain)

Created: 03/21/2013

Components: Language, CustomTag

Versions: 10.0

Failure Type:

Found In Build/Fixed In Build: Final /

Priority/Frequency: Major / All users will encounter

Locale/System: English / Platforms All

Vote Count: 1

Problem Description: cfimport behave differently in cf10 when resolving the path /../xxx to get to a directory outside the webroot

Steps to Reproduce: 
In CF9 this works in CF10 it doesn't.

<cfimport taglib="/../CustomTags/" prefix="myTags">

Actual Result: 
Error Occurred While Processing Request
The tag you are trying to use cannot be found within any tag libraries you have imported.

Unknown tag: myTags:testCustomTag.

ColdFusion cannot determine how to process the tag myTags:renderOrgDropDown because the tag is unknown and is not in any imported tag libraries. The tag name might be misspelled.

Expected Result:

"This is the testCustomTag responding correctly"

Any Workarounds:

change the path to a relative path like "../../CustomTags" but this leaves code much less portable.

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

Watson Bug ID:	3526880

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

Mac Book Pro OS X 10.8.3

Coldfusion 10,0,8,283965 with cumulative hotfix 1 (has been an issue since beta of CF10)

Java 1.7.0_15 (also happens on Java 1.6.xx)



Would be great to get this issue addressed as it seems like an oversight which should work correctly
Comment by External U.
15936 | March 21, 2013 04:51:12 AM GMT
I have the same problem and is going to mean changing a ton of code if we upgrade to CF10 which is gonna mean a ton of re-testing so please fix!
Vote by External U.
15940 | March 21, 2013 05:11:35 AM GMT
Copy paste error in the actual result, it should read: ColdFusion cannot determine how to process the tag myTags:testCustomTag not ColdFusion cannot determine how to process the tag myTags:renderOrgDropDown
Comment by External U.
15937 | March 21, 2013 05:23:22 AM GMT
To me taglib path looks invalid. The reason being, that when a taglib path starts with a backward slash ("/"), it signify that its relative to wwwroot. And going by above logic an "/../" would mean the parent wwwroot directory which is not where the tag template is defined. To make up work please remove the started "/" from taglib path. Following code with explained modification will work .. <cfimport taglib="../CustomTags/" prefix="myTags"> <myTags:testCustomTag>
Comment by Awdhesh K.
15938 | March 03, 2014 02:08:08 AM GMT
problem with that is it relative to the calling template, it is intentional to be one level up from the webroot so the templates are not in the webroot but are in a known 'absolute' position hence /../ is effectively absolute from the webroot where ../ is relative.
Comment by Doug C.
15939 | December 16, 2016 03:47:16 PM GMT