Uploaded image for project: 'MidPoint'
  1. MidPoint
  2. MID-4899

CDATA new lines lost on REST upload

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Reviewed
    • Affects Version/s: 3.8
    • Fix Version/s: 3.9
    • Component/s: GUI, Repository
    • Labels:
      None
    • Environment:

      Ubuntu Server 18.4 / PostgreSQL 9.5
      Linux workstation client

    • Subscription:
      Active subscription

      Description

      We face the following behavior:

      • When uploading XML files manually in the "Import Object" UI page, line breaks in code tags are always preserved (whether we use CDATA declaration or not)
      • When we upload XML files via the rest API, lines are garbled (also independently of the presence of a CDATA declaration)

      Both uploads should be consistent.

      Note: It affects all types of objects

      An example is attached with all the files:

      • functions.xml: The original function library
      • functions-after-manual-upload.xml: The function library as stored in midpoint after manual UI upload
      • functions-after-rest-put.xml: The library as stored in midpoint after an http put upload, where the code block has been garbled to a single line.
      • put.sh: The upload script as a reference

        Attachments

        1. functions.xml
          0.9 kB
        2. functions-after-manual-upload.xml
          2 kB
        3. functions-after-rest-put.xml
          3 kB
        4. put.sh
          0.2 kB

          Activity

            People

            • Assignee:
              yannick Yannick Kirschhoffer
              Reporter:
              yannick Yannick Kirschhoffer
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: