Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-7528

org.apache.sling.jcr.webdav fails for files containing "%"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • JCR Webdav 2.3.8
    • JCR Webdav 2.3.10
    • JCR
    • None

    Description

      Adding (PUTting) a file with a properly escaped percent sign leads to:

      02.03.2018 10:04:10.301 *ERROR* [127.0.0.1 [1519981450286] PUT /content/dam/test/10%20100%25%20Total%20Success.mp3 HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught Throwable
      java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: " T"
             at java.net.URLDecoder.decode(URLDecoder.java:194)
             at org.apache.sling.jcr.webdav.impl.helper.SlingTikaDetector.detect(SlingTikaDetector.java:68) [org.apache.sling.jcr.webdav:2.3.8]
             at org.apache.jackrabbit.server.io.ImportContextImpl.<init>(ImportContextImpl.java:87) [org.apache.sling.jcr.webdav:2.3.8]
             at org.apache.jackrabbit.webdav.simple.DavResourceImpl.getImportContext(DavResourceImpl.java:888) [org.apache.sling.jcr.webdav:2.3.8]
             at org.apache.jackrabbit.webdav.simple.DavResourceImpl.addMember(DavResourceImpl.java:529) [org.apache.sling.jcr.webdav:2.3.8]
      

      This is because SlingTikaDetector tries to handle a URI where actually a repository path is supplied (apart from that, the attempt to do URI parsing is very interesting...).

      The proper fix seems to be to just remove any attempt to deal with URIs here.

      Attachments

        Issue Links

          Activity

            People

              rombert Robert Munteanu
              reschke Julian Reschke
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m