Uploaded image for project: 'Magnolia REST Framework'
  1. Magnolia REST Framework
  2. MGNLREST-343

Empty node name when using illegal characters

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 2.2.11
    • None
    • None
    • None
    • DevX 1, DevX 2
    • 5

      Steps to reproduce

      1.  Use the nodes endpoint to create a node name <test>
        curl http://localhost:8080/magnoliaAuthor/.rest/nodes/v1/website/travel \
        -H "Content-Type: application/json" \
        -X PUT -i \
        --user superuser:superuser \
        --data \
        '{
          "name": "<test>",
          "type": "mgnl:page",
          "path": "/travel/<test>",
          "properties": [
            {
              "name": "title",
              "type": "String",
              "multiple": false,
              "values": [
                "Hello REST"
              ]
            },
            {
              "name": "mgnl:template",
              "type": "String",
              "multiple": false,
              "values": [
                "travel-demo:pages/standard"
              ]
            }
           ]
        }'

      Expected results

      Either node with name <test> is created/illegal chars are replaced or an error is thrown informing about the wrong name

      Actual results

      A node with empty name is created

      Development notes

      info.magnolia.rest.service.node.v1.NodeEndpoint.createNode(String, String, RepositoryNode) could check and validate the passed name and let the user know if the name is not valid.

        Acceptance criteria

              jbenito Javier Benito
              jayala Jonathan Ayala
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD