You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Robert Munteanu (JIRA)" <ji...@apache.org> on 2018/03/23 11:00:00 UTC
[jira] [Resolved] (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:all-tabpanel ]
Robert Munteanu resolved SLING-7528.
------------------------------------
Resolution: Fixed
Assignee: Robert Munteanu
PR merged, thanks for the contribution + test [~reschke]!
> 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
> Assignee: Robert Munteanu
> Priority: Major
> Fix For: JCR Webdav 2.3.10
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> 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)