tracker issue : CF-4053567

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

expandPath() returns coldfusion bin directory

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Christopher Tierney / Christopher Tierney (Christopher Tierney)

Created: 09/10/2015

Components: Web Container (Tomcat)

Versions: 11.0

Failure Type: Data Corruption

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Critical / Some users will encounter

Locale/System: English / Linux All

Vote Count: 0

Listed in the version 2016.0.0.297996 Issues Fixed doc
Verification notes: verified_not_fixed on September 08, 2019 using build 2016.0.01.298513
Problem Description:
when using expandPath() on Linux (including OSX) to go up a directory from the website's root it returns the the ColdFusion {instance}/bin directory (which is incorrect). Tested with both the directory non-existent and created. In Windows this works correctly.

Steps to Reproduce:

Actual Result:
returns /opt/coldfusion11/cfusion/bin

Expected Result:
on an example directory of "/data/websites/myWebsite"
returns "/data/websites/myDir"

Any Workarounds:
Find different way of finding website root or use Windows

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

Watson Bug ID:	4053567

External Customer Info:
External Company:  
External Customer Name: Christopher Tierney
External Customer Email:  
External Test Config: My Hardware and Environment details:

tested on OSX and CentOS



Speaking with Chris Schmitz in Slack, he tested CF10U17 he says "/../" gets him the root on Linux (SLES) and "<cf_install_dir>\cfusion\" on Win 8.1. This is different from my results on CF11.
Comment by External U.
5915 | September 10, 2015 09:35:41 AM GMT
Additional testing on Windows 10 & CF11 reveals a similar issue. "expandPath('/../')" gives me "C:\ColdFusion11\cfusion\" but I would expect "D:\websites\". Yet "expandPath('/../myDir')" gives me "D:\websites\myDir" as expected. Further testing by Chris Schmitz says it only works for him if the directory exists, where as mine returns it either way (he's on Win 8.1).
Comment by External U.
5916 | September 10, 2015 10:13:10 AM GMT
Thanks for marking this "fixed"... please let me know where this patch will be released when you know.
Comment by External U.
5917 | September 29, 2015 03:04:47 PM GMT
This issue doesn't appear to have been fixed as of 11,0,08,298512. When will this fix be released? Is there a way to get early access to this fix? Thanks, John
Comment by External U.
5918 | May 17, 2016 07:25:54 AM GMT
Problem exists only worse on CF2016. In windows this can provide inconsistent results, including providing different paths when template is called directly, via include, or via CFC method invocation.
Comment by Kenneth F.
5919 | July 06, 2017 03:26:57 PM GMT
Hi Adobe, I've verified this is NOT fixed in CF2016 Update 1 (build 2016.0.01.298513), nor in CF2018 Update 4 (2018.0.04.314546). Repro: Application.cfc ---------------------- component { = "ticket_4053567";} ---------------------- index.cfm ---------------------- <cfscript> APPLICATION.myPaths = ["/../","/../asdf"]; for(path in APPLICATION.myPaths) { writeOutput(expandPath(path) & '<br>'); } cfinclude(template="myinclude.cfm"); invoke("MyCFC", "myFunction"); </cfscript> ---------------------- myinclude.cfm ---------------------- <cfscript> for(path in APPLICATION.myPaths) { writeOutput(expandPath(path) & '<br>'); } </cfscript> ---------------------- MyCFC.cfc ---------------------- component { function myFunction() { for(path in APPLICATION.myPaths) { writeOutput(expandPath(path) & '<br>'); } } } ---------------------- CF11 Update 7 (build on x64 Windows 10 result: -------------------------------------------- C:\ColdFusion11\cfusion\ (bad) W:\websites\mysitecomcf11\asdf (good) C:\ColdFusion11\cfusion\ W:\websites\mysitecomcf11\asdf C:\ColdFusion11\cfusion\ W:\websites\mysitecomcf11\asdf -------------------------------------------- CF2016 Update 1 (build 2016.0.01.298513) on x64 Windows 10 result: -------------------------------------------- C:\ColdFusion2016\cfusion\wwwroot\..\ (bad) W:\websites\mysitecomcf2016\www\..\asdf (meh - CF11's shorter resolution is preferred) C:\ColdFusion2016\cfusion\wwwroot\..\ W:\websites\mysitecomcf2016\www\..\asdf C:\ColdFusion2016\cfusion\wwwroot\..\ W:\websites\mysitecomcf2016\www\..\asdf -------------------------------------------- CF2018 Update 4 (build 2018.0.04.314546) on x64 Windows 10 result: -------------------------------------------- C:\ColdFusion2018\cfusion\wwwroot\..\ (bad) W:\websites\mysitecomcf2018\www\..\asdf (meh - CF11's shorter resolution is preferred) C:\ColdFusion2018\cfusion\wwwroot\..\ W:\websites\mysitecomcf2018\www\..\asdf C:\ColdFusion2018\cfusion\wwwroot\..\ W:\websites\mysitecomcf2018\www\..\asdf -------------------------------------------- This ticket needs re-opened/fixed. Thanks!, -Aaron
Comment by Aaron N.
31306 | September 08, 2019 07:23:14 AM GMT
FWIW: None of the asdf directories actually exist.
Comment by Aaron N.
31307 | September 08, 2019 07:24:41 AM GMT
Hi Adobe, Is someone watching this thread? The issue is NOT fixed. Thanks!, -Aaron
Comment by Aaron N.
31447 | September 28, 2019 10:29:49 PM GMT