[ 
https://issues.apache.org/jira/browse/SLING-3496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13961848#comment-13961848
 ] 

Carsten Ziegeler commented on SLING-3496:
-----------------------------------------

Thanks for the issue and the information. I guess the fix in SLING-3482 is too 
simple.
The problem there is caused by servlets being registered into the resource 
tree. For example, if a servlet is registered at /libs/foo/baa/my.servlet, fake 
resource providers are created for /libs, /libs/foo and /libs/foo/baa.
I think we're facing several issues:
- servlet resources are available to everyone
- intermediate fake resource providers are available to everyone

I haven't yet looked into the detail, but I could imagine that we should 
protect the servlet resources and somehow use the same protected for the 
generated fake intermediate resource proivders. This would have solved 
SLING-3482 without the change in behaviour.


> Synthetic resource cannot be resolved, but its children can be resolved
> -----------------------------------------------------------------------
>
>                 Key: SLING-3496
>                 URL: https://issues.apache.org/jira/browse/SLING-3496
>             Project: Sling
>          Issue Type: Bug
>          Components: ResourceResolver
>    Affects Versions: Resource Resolver 1.1.0
>         Environment: OS X 10.8.5, JDK 1.6.0_65
>            Reporter: Nan Fan
>         Attachments: mysample-1.0.0-SNAPSHOT.jar, mysample-source.zip
>
>
> The change in SLING-3482 causes a problem that synthetic resource cannot be 
> resolved, but its children can be resolved in below scenarios:
> Scenario 1:
> Please refer attached bundle and source, I package a resource which parent 
> folder does not exist previously in jcr repository. The resource is declared 
> in pom as:
> <Include-Resource>{maven-resources},src/main/scripts</Include-Resource>
> <Sling-Bundle-Resources>/apps/newfolder1/myres1</Sling-Bundle-Resources>
> After install bundle, it does return 404 for url '/apps/newfolder1.json' and 
> returns json for '/apps/newfolder1/myres1.json'.
> Scenario 2:
> The resource.path in esp script returns '<name>.<selector>.<extension>' for 
> Synthetic resources. The code is in 
> bundles/extensions/explorer/src/main/resources/libs/sling/servlet/default/explorer/node.esp)
> var path = resource.path;
> it will return '/libs.explorer.node.html' if I'm visiting url 
> '/libs.explorer.node.html' where '/libs' is a synthetic resource.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to