Valid base64 string doesn't convert into image

Description

When we try to convert the base64 format into image file, it throws an error on lucee. ACF18 does as expected. I've attached the test file to reproduce the issue.

Java stack trace:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 lucee.runtime.exp.NativeException: org.apache.commons.imaging.ImageReadException:4 components are invalid or unsupported at org.apache.commons.imaging.formats.jpeg.decoder.JpegDecoder.visitSOS(JpegDecoder.java:115) at org.apache.commons.imaging.formats.jpeg.JpegUtils.traverseJFIF(JpegUtils.java:75) at org.apache.commons.imaging.formats.jpeg.decoder.JpegDecoder.decode(JpegDecoder.java:428) at org.apache.commons.imaging.formats.jpeg.JpegImageParser.getBufferedImage(JpegImageParser.java:95) at org.apache.commons.imaging.Imaging.getBufferedImage(Imaging.java:1369) at org.apache.commons.imaging.Imaging.getBufferedImage(Imaging.java:1263) at org.apache.commons.imaging.Imaging.getBufferedImage(Imaging.java:1232) at org.lucee.extension.image.coder.SanselanCoder.toBufferedImage(SanselanCoder.java:72) at org.lucee.extension.image.coder.DoubleCoder.toBufferedImage(DoubleCoder.java:55) at org.lucee.extension.image.ImageUtil.toBufferedImage(ImageUtil.java:72) at org.lucee.extension.image.Image.(Image.java:238) at org.lucee.extension.image.Image.(Image.java:224) at org.lucee.extension.image.tag.Image.doStartTag(Image.java:274) at test.testcases.ldev2210.test.test_cfm$cf.call(/test/testcases/LDEV2210/test/test.cfm:7) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:942) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:834) at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:216) at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:42) at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2409) at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2399) at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2374) at lucee.runtime.engine.Request.exe(Request.java:43) at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1109) at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1055) at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:97) at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:51) at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:394) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: org.apache.commons.imaging.ImageReadException:4 components are invalid or unsupported ... 48 more

Environment

None

Status

Assignee

Michael Offner

Reporter

Pothys - MitrahSoft

Labels

None

Sprint

None

Fix versions

Priority

Blocker
Configure