sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Parvulescu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SLING-2502) Incorrect escaping of property names in JcrModifiablePropertyMap on save
Date Thu, 14 Jun 2012 14:10:43 GMT

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

Alex Parvulescu commented on SLING-2502:
----------------------------------------

thanks Carsten for the feedback.
I wasn't aware that the ball was in my court :)

Your test fails as expected, see my previous comment: 
> This will fix a part of the problem: it handles updating properties that contain ":"
like jcr:title, jcr:lastModified and friends. 
It doesn't however, handle adding properties that fall into this category.

...and the test adds a new property, which is not covered by the provided patch.

I agree that generally a patch has to cover everything, but the initial patch was just meant
to get things going a bit.
It also serves as a quick fix for applications that use this map for updates, not for new
properties (read CQ Find and Replace)

wrt your proposal:
> - if it has a colon, check if the prefix is known - if so check if any other character
needs escaping 

this is a tricky one: how do you know if a prefix is known? I'd have to have access to the
registered node types, which you don't in this map.
Here I'm not talking about the classics: jcr & sling, I'm mostly referring to "cq" and
friends ;)


                
> Incorrect escaping of property names in JcrModifiablePropertyMap on save
> ------------------------------------------------------------------------
>
>                 Key: SLING-2502
>                 URL: https://issues.apache.org/jira/browse/SLING-2502
>             Project: Sling
>          Issue Type: Bug
>          Components: JCR
>    Affects Versions: JCR Resource 2.1.0
>            Reporter: Alex Parvulescu
>         Attachments: SLING-2502.patch, org.apache.sling.jcr.resource.patch
>
>
> This follows SLING-2425 where there was a change in the way JCR properties are escaped
before being persited.
> The regression happens for properties that have ":" in the name.
> For example: jcr:title after the #save() call will turn into jcr%3Atitle so the node
will end up with a brand new property, instead of having the old jcr:title updated.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message