You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Bertrand Delacretaz (JIRA)" <ji...@apache.org> on 2015/05/26 11:01:17 UTC

[jira] [Assigned] (SLING-4748) Request using "sling:bg=true" causes StackOverflow when no read access to /var

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

Bertrand Delacretaz reassigned SLING-4748:
------------------------------------------

    Assignee: Bertrand Delacretaz

> Request using "sling:bg=true" causes StackOverflow when no read access to /var
> ------------------------------------------------------------------------------
>
>                 Key: SLING-4748
>                 URL: https://issues.apache.org/jira/browse/SLING-4748
>             Project: Sling
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: Background Servlet 1.0.0
>            Reporter: Jörg Hoh
>            Assignee: Bertrand Delacretaz
>
> I have a system, where the anonymous user does not have read access to /var/bg. When I do a call to it (for example: http://localhost:4503/?sling:bg=true", it returns with a internal server error. The log shows a stackoverflow exception, caused by
> {code}
> ...
> at org.apache.sling.bgservlets.impl.DeepNodeCreator.deepCreateNode(DeepNodeCreator.java:54)
> at org.apache.sling.bgservlets.impl.DeepNodeCreator.deepCreateNode(DeepNodeCreator.java:54)
> ...
> {code}
> Looking at this line in the code I see a recursive call of deepCreateNode, which is executed, when the item itself does not exist. Which is true from the view of an anonymous session, which doesn't have read access to nodes beneath /var.
> The code should be improved, so it does either check with an admin session that the path exists, but is simply not readable, or preferably add some detection, that it has already reached "/" and that it doesn't make sense to continue then. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)