angela created OAK-238:
--------------------------
Summary: ValueFactory: Missing identifier validation when creating
(weak)reference value from String
Key: OAK-238
URL: https://issues.apache.org/jira/browse/OAK-238
Project: Jackrabbit Oak
Issue Type: Bug
Components: jcr
Reporter: angela
the JCR specification mandates validation of the identifier during
value conversion from STRING to REFERENCE or WEAK_REFERENCE:
<quote from 3.6.4.1 From STRING To)>
REFERENCE or WEAKREFERENCE: If the string is a syntactically valid
identifier, according to the implementation, it is converted directly,
otherwise a
ValueFormatException is thrown. The identifier is not required to be that of an
existing node in the current workspace.
<end_quote>
the current ValueFactory implementation in oak-jcr lacks that validation:
creating a REFERENCE or WEAKREFERENCE value using
ValueFactory#createValue(String, int) succeeds even if the specified string
isn't a valid referenceable node identifier.
--
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