Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-6371

JSONConfigurationWriter does not escape backslash and other chars

    XMLWordPrintableJSON

Details

    Description

      JSONConfigurationWriter.write method currently escapes/handles only three input characters: dblquote, \n and \r.

      As a result, it produces invalid JSON strings, for example when Windows path is present in /system/console/status-slingsettings/, which caused JSON parsers to fail.

      It should escape the backslash and other characters according to [1].

      [0] https://github.com/apache/felix-dev/blob/master/inventory/src/main/java/org/apache/felix/inventory/impl/helper/JSONConfigurationWriter.java#L117

      [1] https://greenbytes.de/tech/webdav/rfc8259.html#rfc.section.7 

      Attachments

        Activity

          People

            cziegeler Carsten Ziegeler
            VoloMyhal Volo Myhal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: