Uploaded image for project: 'Lucee Development'
  1. LDEV-869

Changing code in a file that's been loaded with two different cases errors

    Details

    • Type: Bug
    • Status: Deployed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 4.5.2.018, 5.0.0.252
    • Fix Version/s: 5.1.2.20
    • Labels:
      None
    • Sprint:
      February 2017 Release

      Description

      There is a bug in Lucee were a template that's hit with two different cases in the path or filename will throw a weird compilation error after code has changed in the file.

      These steps must be followed exactly and will work on Lucee 4 with the java agent enabled or on Lucee 5.

      1. Create a file foo.cfm
      2. Add a few lines of CFML code setting variables
      3. Hit the file as /foo.cfm in the browser
      4. Now hit the file as Foo.cfm in the browser (upper case "F")
      5. Now edit the file and add an additional line of CF code to the end
      6. Refresh /Foo.cfm in the browser (still upper case "F")
      7. Now load /foo.cfm in the browser (back to the original lower case "f")
      8. You will receive a java.lang.ArrayIndexOutOfBoundsException

      In Lucee 4 you can work around this by removing the java agent. In Lucee 5 there is no workaround.

      Message 12
      Cause java.lang.ArrayIndexOutOfBoundsException
      lucee.runtime.exp.NativeException: 12
      at foo_cfm$cf.call(C:\sandbox\case\foo.cfm:14)
      at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:893)
      at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:808)
      at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:803)
      at lucee.runtime.listener.ClassicAppListener._onRequest(ClassicAppListener.java:62)
      at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:44)
      at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2250)
      at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2242)
      at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2210)
      at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:848)
      at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:103)
      at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:62)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
      at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
      at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
      at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
      at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
      at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
      at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
      at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
      at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:285)
      at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:264)
      at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
      at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:175)
      at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
      at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:802)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.ArrayIndexOutOfBoundsException: 12
      ... 35 more

        Attachments

          Activity

            People

            • Assignee:
              michaeloffner Michael Offner
              Reporter:
              bdw429s Brad Wood
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: