tracker issue : CF-4053567

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

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
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:
expandPath('/../myDir');

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

Attachments:

Comments:

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