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

reject item names with unpaired surrogates early

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.5.18
    • None
    • core, jcr, segment-tar

    Description

      Apparently, the following node name is accepted:

      "foo\ud800"

      but a subsequent getPath() call fails:

      javax.jcr.InvalidItemStateException: This item [/test_node/foo?] does not exist anymore
          at org.apache.jackrabbit.oak.jcr.delegate.ItemDelegate.checkAlive(ItemDelegate.java:86)
          at org.apache.jackrabbit.oak.jcr.session.operation.ItemOperation.checkPreconditions(ItemOperation.java:34)
          at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.prePerform(SessionDelegate.java:615)
          at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.perform(SessionDelegate.java:205)
          at org.apache.jackrabbit.oak.jcr.session.ItemImpl.perform(ItemImpl.java:112)
          at org.apache.jackrabbit.oak.jcr.session.ItemImpl.getPath(ItemImpl.java:140)
          at org.apache.jackrabbit.oak.jcr.session.NodeImpl.getPath(NodeImpl.java:106)
          at org.apache.jackrabbit.oak.jcr.ValidNamesTest.nameTest(ValidNamesTest.java:271)
          at org.apache.jackrabbit.oak.jcr.ValidNamesTest.testUnpairedSurrogate(ValidNamesTest.java:259)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

      (test case follows)

      Attachments

        1. ValidNamesTest.java
          9 kB
          Julian Reschke
        2. OAK-5506-01.patch
          6 kB
          Francesco Mari
        3. OAK-5506-02.patch
          7 kB
          Francesco Mari
        4. OAK-5506-name-conversion.diff
          3 kB
          Julian Reschke
        5. OAK-5506.diff
          3 kB
          Julian Reschke
        6. OAK-5506-4.diff
          16 kB
          Julian Reschke
        7. OAK-5506-bench.diff
          3 kB
          Julian Reschke
        8. OAK-5506-segment.diff
          3 kB
          Julian Reschke
        9. OAK-5506-segment2.diff
          7 kB
          Julian Reschke
        10. OAK-5506-segment3.diff
          5 kB
          Julian Reschke
        11. OAK-5506-jcr-level.diff
          4 kB
          Julian Reschke

        Issue Links

          Activity

            People

              Unassigned Unassigned
              reschke Julian Reschke
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: