Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-5055

info.magnolia.cms.util.ClasspathResourcesUtil.findResources(Filter) doesn't work properly with a URLClassLoader that provides http://.. URLs.


    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 4.5.9
    • 4.5.6
    • core
    • None

      We are running in to an issue where we get stuck until we go OOM due to some bad handling when the classloader provides URLs such as http://something/.
      The issue comes from the fact that the code gets all the URLs the current classloader provides but doesn't seem to handle them properly knowing that it is a URLClassLoader that very well might provide http:// based URLs.

      In our case our classloader will provide a url like http://something.something:0/. This is then passed through the info.magnolia.cms.util.ClasspathResourcesUtil.sanitizeToFile(URL) method which will strip this down to /.

      The result of this is that the info.magnolia.cms.util.ClasspathResourcesUtil.collectFiles(Collection<String>, File, Filter) method will collect every file on the whole system.

        Acceptance criteria

              rkovarik Roman Kovařík
              thbr03 Tomas Brimor
              0 Vote for this issue
              1 Start watching this issue


                  Bug DoR
                  Task DoD