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

ModeShape-Schematic JSON Reader hangs on incorrect json

    Details

    • Steps to Reproduce:
      Hide

      repository.json (note that "workspaces" element is opened with "{" and closed with "]")
      {
      "name" : "testRepo",
      "workspaces" :

      { "default" : "default", "initialContent" : [ "default" = "jcr/initial-content.xml" }

      }
      }

      Java code:
      RepositoryConfiguration config = repositoryConfiguration.read("jcr/repository.json");

      Result:
      JsonReader.parseArray hangs on reading the initialContent value.

      Show
      repository.json (note that "workspaces" element is opened with "{" and closed with "]") { "name" : "testRepo", "workspaces" : { "default" : "default", "initialContent" : [ "default" = "jcr/initial-content.xml" } } } Java code: RepositoryConfiguration config = repositoryConfiguration.read("jcr/repository.json"); Result: JsonReader.parseArray hangs on reading the initialContent value.

      Description

      When encountering some incorrect JSON in, for example, repository config, ModeShape will hang and consume all the available memory.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                hchiorean Horia Chiorean
                Reporter:
                eldaryus Eldar Yusupov
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: