cffile action read without file attribute throws a NPE.

Description

cffile action read without file attribute throws a NullPointerException. The regression starts from 5.2.2.56-SNAPSHOT onwards. The fix for the ticket https://luceeserver.atlassian.net/browse/LDEV-907#icft=LDEV-907 causes the issue.

https://github.com/lucee/Lucee/blob/6.0/core/src/main/java/lucee/runtime/cache/tag/CacheHandlerCollectionImpl.java#L209

Here is the stack trace

"ERROR","ajp-nio-8009-exec-1","03/17/2021","12:26:03","","java.lang.NullPointerException;java.lang.NullPointerException;lucee.runtime.exp.NativeException: java.lang.NullPointerException at lucee.runtime.cache.tag.CacheHandlerCollectionImpl.createId(CacheHandlerCollectionImpl.java:209) at lucee.runtime.tag.FileTag.createCacheId(FileTag.java:704) at lucee.runtime.tag.FileTag.actionRead(FileTag.java:660) at lucee.runtime.tag.FileTag.doStartTag(FileTag.java:430) at test.testcase.ldev3353.tested_cfm$cf.call(/test/testcase/LDEV3353/tested.cfm:1) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1020) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:912) at lucee.runtime.listener.ClassicAppListener._onRequest(ClassicAppListener.java:65) at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:45) at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2446) at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2436) at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2407) at lucee.runtime.engine.Request.exe(Request.java:44)

Environment

None

Activity

Show:

Pothys - MitrahSoft 17 March 2021 at 11:54
Edited

I added a fix for this ticket and improved the error message for the cffile tag

Pull Request: https://github.com/lucee/Lucee/pull/1234

Fixed

Details

Assignee

Reporter

Priority

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Affects versions

Created 17 March 2021 at 07:01
Updated 18 June 2023 at 16:57
Resolved 20 May 2021 at 11:33

Flag notifications