Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-238

ValueFactory: Missing identifier validation when creating (weak)reference value from String

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.5
    • jcr
    • None

    Description

      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.

      Attachments

        Activity

          People

            angela Angela Schreiber
            angela Angela Schreiber
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: