jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (OAK-5260) Incorrect handling of subpaths with leading left curly bracket
Date Tue, 20 Dec 2016 10:23:58 GMT

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

Thomas Mueller edited comment on OAK-5260 at 12/20/16 10:23 AM:
----------------------------------------------------------------

The spec is not clear for such cases, but I would prefer if we throw an "Invalid Path" exception
when trying to add or read nodes named "\{" and similar.

* The current implementation does not allow one to add such nodes, so I don't think we have
compatibility issues for adding nodes.
* Compatibility for reading: sure, any change means it is not 100% compatible, but SLING-6383
shows that the current behavior is so strange that no sane application would rely on the current
behavior (which is: any node name that starts with "\{" but doesn't contain "}" is the same
as the current node).

Therefore, I suggest I create a new patch (as small as possible, but with additional unit
tests).


was (Author: tmueller):
The spec is not clear for such cases, but I would prefer if we throw an "Invalid Path" exception
when trying to add or read nodes named "{" and similar.

* The current implementation does not allow one to add such nodes, so I don't think we have
compatibility issues for adding nodes.
* Compatibility for reading: sure, any change means it is not 100% compatible, but SLING-6383
shows that the current behavior is so strange that no sane application would rely on the current
behavior (which is: any node name that starts with "\{" but doesn't contain "}" is the same
as the current node).

Therefore, I suggest I create a new patch (as small as possible, but with additional unit
tests).

> Incorrect handling of subpaths with leading left curly bracket
> --------------------------------------------------------------
>
>                 Key: OAK-5260
>                 URL: https://issues.apache.org/jira/browse/OAK-5260
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: jcr
>            Reporter: Bertrand Delacretaz
>            Assignee: Julian Sedding
>             Fix For: 1.6
>
>         Attachments: OAK-5260-jsedding.patch, OAK-5260.patch
>
>
> As per SLING-6383 it looks like the Oak name mapping causes for example getItem("/libs/{sub")
(with a left curly bracket in the path) to return the /libs node if that exists but the supplied
path does not.
> I'll attach a patch with a test that demonstrates this. 
> [~fmeschbe] mentions in that Sling issue that the parsing of the CR 2 section 3.2.5.1
Expanded Form could be involved, treating the left curly bracket in a special way that's not
appropriate here.



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

Mime
View raw message