[ 
https://issues.apache.org/jira/browse/SLING-787?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Felix Meschberger closed SLING-787.
-----------------------------------

    Resolution: Fixed

This is fixed.

> New ResourceResolver match patterns for resolve() and map() must be bound to 
> the beginning of the string
> --------------------------------------------------------------------------------------------------------
>
>                 Key: SLING-787
>                 URL: https://issues.apache.org/jira/browse/SLING-787
>             Project: Sling
>          Issue Type: Bug
>          Components: JCR Resource
>    Affects Versions: JCR Resource 2.0.4
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: JCR Resource 2.0.4
>
>
> The new ResourceResolver build lists of regular expression mapping to resolve 
> incoming requests and to map outgoing resource paths. These regular 
> expressions are not bound to the beginning of the string.
> As a result, given a match rule (for resolution) of
>      http/somehost.80/   => /content/somehost/
> and a request
>       http://other:8080/parent/http/somehost.80/some.html
> the resulting resource path would be
>       http/other.8080/parent/content/somehost/some.html
> which would of course fail. In fact, the given match rule must not match the 
> request.
> An example of revers mapping: Given the rule
>      /content/  -->  /
> with the intent to cut off leading "/content/" would result in mapping the 
> path
>     /libs/content/page.html
> to
>    /libs/page.html
> which is of course completely wrong.
> The fix is to make the pattern to always only match from the beginning of the 
> string.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to