Status/Resolution/Reason: Closed/Withdrawn/NeedMoreInfo
Reporter/Name(from Bugbase): Tobias R. / ()
Created: 11/08/2019
Components: Language, Functions
Versions: 2018
Failure Type: Incorrectly functioning
Found In Build/Fixed In Build: 2018.0.02.313961 /
Priority/Frequency: Normal / All users will encounter
Locale/System: English / Mac All
Vote Count: 0
Problem Description:
If you pass a path with a trailing slash into getCanonicalPath, it appends a colon at the end of the string.
Steps to Reproduce:
<cfset path = "/Library/WebServer/Documents/sample">
<cfoutput>Original: #path#<br /></cfoutput>
<cfset testPath = getCanonicalPath(path) />
<cfoutput>Canonical: #testPath#<br /></cfoutput>
<cfset path = "/Library/WebServer/Documents/sample/">
<cfoutput>Original with Slash: #path#<br /></cfoutput>
<cfset testPath = getCanonicalPath(path) />
<cfoutput>Canonical with Slash: #testPath#<br /></cfoutput>
Actual Result:
Original: /Library/WebServer/Documents/sample
Canonical: /Users/tobyreiter/htdocs/sample
Original with Slash: /Library/WebServer/Documents/sample/
Canonical with Slash: /Users/tobyreiter/htdocs/sample:
Expected Result:
Original: /Library/WebServer/Documents/sample
Canonical: /Users/tobyreiter/htdocs/sample
Original with Slash: /Library/WebServer/Documents/sample/
Canonical with Slash: /Users/tobyreiter/htdocs/sample/
Any Workarounds:
Attachments:
Comments: