You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2012/06/05 09:39:23 UTC

[jira] [Commented] (SLING-2502) Incorrect escaping of property names in JcrModifiablePropertyMap on save

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

Carsten Ziegeler commented on SLING-2502:
-----------------------------------------

Good catch!

I think, the right way would be to modify the save() method to check whether a property name is allowed or not:
- if it has a colon, check if the prefix is known - if so check if any other character needs escaping
- if the prefix is unknown, to full escaping as is

The clear method clears the whole map which means all properties need to be removed, that's why all keys are added
                
> 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
>
>
> 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