Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1957

Local name escaping does not properly encode whitespace characters

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Won't Fix
    • Affects Version/s: 3.3.0.Final
    • Fix Version/s: 3.4.0.Final
    • Component/s: Common, JCR
    • Labels:
      None

      Description

      ModeShape's Jsr283Encoder class does not properly escape the whitespace characters:

      Section 3.2.2 of JSR-283 defines a local name as follows:

      LocalName ::= ValidString - SelfOrParent
      /* Any ValidString except SelfOrParent */
      SelfOrParent ::= '.' | '..'
      ValidString ::= ValidChar {ValidChar}
      ValidChar ::= XmlChar - InvalidChar
      /* Any XmlChar except InvalidChar */
      InvalidChar ::= '/' | ':' | '[' | ']' | '|' | '*'
      XmlChar ::= /* Any character that matches the Char production at http://www.w3.org/TR/xml/#NT-Char */
      

      where the Char production at http://www.w3.org/TR/xml/#NT-Char is as follows:

      Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]	/* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. */
      

      Note that #x9 is the tab character, #xA is the line feed character, #xD is the carriage return character, and #x20 is the space character.

      But ModeShape's Jsr283Encoder is not properly encoding/decoding the whitespace characters.

      We will need to address whether this fix will be backward compatible. If not, we may need to provide a switch/repository setting that allows someone to use the older (incorrect) encoding/decoding.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  rhauch Randall Hauch
                  Reporter:
                  rhauch Randall Hauch
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: