trim [path] in file does not exist exception for toResourceExisting to max 255 chars

Description

if a non path (i.e src of a file) is accidently passed in, the logged error message becomes enormous

or we add a check earlier…

at lucee.commons.io.res.util.ResourceUtil.toResourceExisting(ResourceUtil.java:228)     at lucee.commons.io.res.util.ResourceUtil.toResourceExisting(ResourceUtil.java:191)     at lucee.runtime.functions.file.FileInfo.call(FileInfo.java:12)     at img.depth_cfm$cf$i.call(/img/depth.cfm:4)     at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1025)     at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:948)     at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:219)     at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:44)     at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2493)     at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2478)     at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2449)     at lucee.runtime.engine.Request.exe(Request.java:45)     at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1216)     at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1162)     at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:97)     at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:51)

produces this when a base64 image is passed into fileinfo…

https://github.com/lucee/Lucee/blob/6.0/core/src/main/java/lucee/commons/io/res/util/ResourceUtil.java#L209

Attachments

1
  • 31 Dec 2022, 01:02 pm

Activity

Show:

Pothys - MitrahSoft 10 May 2023 at 13:52

Checked the issue with latest version 6.0.0.389-SNAPSHOT. Ensured the large file path trim when characters greater than 255.

Zac Spitzer 2 January 2023 at 15:14

Fixed

Details

Assignee

Reporter

Labels

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

Fix versions

Priority

Created 31 December 2022 at 12:24
Updated 10 May 2023 at 13:52
Resolved 10 May 2023 at 13:52

Flag notifications