You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Julian Reschke (JIRA)" <ji...@apache.org> on 2018/03/02 10:15:00 UTC

[jira] [Commented] (SLING-7528) org.apache.sling.jcr.webdav fails for files containing "%"

    [ https://issues.apache.org/jira/browse/SLING-7528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16383424#comment-16383424 ] 

Julian Reschke commented on SLING-7528:
---------------------------------------

Proposed patch: https://github.com/apache/sling-org-apache-sling-jcr-webdav/pull/1/commits/dcc9e38799fda9f16472576a6d5628966147a7d8

> org.apache.sling.jcr.webdav fails for files containing "%"
> ----------------------------------------------------------
>
>                 Key: SLING-7528
>                 URL: https://issues.apache.org/jira/browse/SLING-7528
>             Project: Sling
>          Issue Type: Bug
>          Components: JCR
>    Affects Versions: JCR Webdav 2.3.8
>            Reporter: Julian Reschke
>            Priority: Major
>             Fix For: JCR Webdav 2.3.10
>
>
> Adding (PUTting) a file with a properly escaped percent sign leads to:
> {noformat}
> 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]
> {noformat}
> 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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)