Eric Norman created SLING-7881:
----------------------------------

             Summary: Resource resolver may calculate incorrect map path for an 
address that is a selector on the root resource
                 Key: SLING-7881
                 URL: https://issues.apache.org/jira/browse/SLING-7881
             Project: Sling
          Issue Type: Bug
    Affects Versions: Resource Resolver 1.6.6
            Reporter: Eric Norman
            Assignee: Eric Norman
             Fix For: Resource Resolver 1.6.8


Prerequistes: The requesting user has rights to read the "/content" resource 
but no rights to read the root resource of the repository.  This would force 
the resource resolver to do a mapping of the request to the "/content" resource 
instead of the root resource.

For example: http://localhost:8080/.2.json should be mapped to /content.2.json 
instead of /content/.2.json

In this scenario the current behavior resolves to a resource with a "path" 
value of "/content/" and the trailing slash in the "path" value has side 
effects elsewhere if other resources are resolved relative to this one (i.e. 
double slashes in the path of child resources, or garbage returned by 
ResourceResolver#map).

 

Expected:  If the mapping redirect value ends with "/" and the replacement 
address suffix starts with a dot, then it should remove the trailing slash from 
the redirect value to make a valid path when the redirect and suffix values are 
combined.



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

Reply via email to