tracker issue : CF-4205828

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

Package access validation seems case-sensitive when it shouldn't

| View in Tracker

Status/Resolution/Reason: To Track//PRNeedInfo

Reporter/Name(from Bugbase): Alexandre P. / ()

Created: 11/09/2019

Components: Language, Functions

Versions: 2018

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: ColdFusion 2018 Update 5 /

Priority/Frequency: Normal / Some users will encounter

Locale/System: / Win 2016

Vote Count: 0

Problem Description: InvalidPackageAccessException is incorrectly thrown sometimes when a component C1 in package P1 tries to invoke a package-access init method on itself or another component in package P1.

Steps to Reproduce:

Didin't have time to investigate further, but it seems that the problem can occur when the calling component's template path is not a case-sensitive match with the target's component template path. This seems to occur in scenarios where the calling component was created from a mapped path (application mappings), but then tries to instantiate itself or another component in the same package using a relative path in which case the path resolution seems different.

Actual Result:

coldfusion.runtime.TemplateProxy$InvalidPackageAccessException: The init  package method in the D:\some\package\Test.cfc  cannot be accessed from D:\SOME\PACKAGE\Test.cfc

Expected Result: No errors should be thrown as components are in the same physical location on disk.

Any Workarounds: I haven't found an easy and reliable work-around for that problem so I just stopped using package-access methods for now, but I did not have time to investigate further.

Attachments:

Comments:

Hi Alexander , I have used the code attached to repro the issue . But I was not able to reproduce it. Can you send us a repro code ? Thanks & Regards, Suchika
Comment by Suchika S.
33297 | March 19, 2020 01:06:31 PM GMT