Konrad Windszus created SLING-12169:
---------------------------------------
Summary: Incorrect mapping of resource names containing '#' or '?'
Key: SLING-12169
URL: https://issues.apache.org/jira/browse/SLING-12169
Project: Sling
Issue Type: Bug
Components: ResourceResolver
Reporter: Konrad Windszus
Sling API does not limit valid characters for resource names. However, the
underlying providers may impose some limitation (like JCR does).
Still the ResourceResolverImpl.getAllMappings() does incorrectly strip the
given resource path by stripping of everything after {{?}} or {{#}}
(https://github.com/apache/sling-org-apache-sling-resourceresolver/blob/a19995d2ec700f1b444adc52c783cdbceae5a7ce/src/main/java/org/apache/sling/resourceresolver/impl/mapping/ResourceMapperImpl.java#L117).
That is an invalid assumption as resource names containing those characters
are totally fine for Sling.
The javadoc should be clarified with regards to the given argument. Either it
is a resource path only (then it should be preprocessed) or it contains a
encoded URI (then it needs to be decoded first by the ResourceMapperImpl).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)