Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-742

ResourceHandler not working anymore if path contains ..

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.0.0.Beta1, 1.4.0.CR2
    • 1.3.20.Final, 1.3.21.Final, 1.3.22.Final, 1.3.23.Final
    • Core
    • None

      In our project restheart we used to build ResourceHandler using the io.undertow.Handlers.resource(ResourceManager rm)

      in order to serve static resource, we use the FileResourceManager.

      ResourceHandler handler = resource(new FileResourceManager(file, 3))
      

      we noticed that starting from version 1.3.20, if the file path contains .., the handler does not work anymore (returns 404)

      File file = new File("/root/sub/../index.html"); // does not work
      
      File file = new File("/root/index.html"); // works
      

              sdouglas1@redhat.com Stuart Douglas (Inactive)
              a.dicesare@softinstigate.com Andrea Di Cesare (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: