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

Incorrect mapping of resource names containing '#' or '?'

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • ResourceResolver
    • None

    Description

      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 not be preprocessed) or it contains an encoded URI (then it needs to be decoded first by the ResourceMapperImpl).

      Attachments

        Activity

          People

            Unassigned Unassigned
            kwin Konrad Windszus
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: