Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-10707

Comma in selector not correctly escaped in capability header

    XMLWordPrintableJSON

Details

    Description

      The manual escaping in https://github.com/apache/sling-scriptingbundle-maven-plugin/blob/master/src/main/java/org/apache/sling/scriptingbundle/plugin/capability/Capabilities.java is not enough for list items containing a comma.

      According to http://docs.osgi.org/specification/osgi.core/7.0.0/framework.module.html#i3306043

      Commas or reverse solidi ('\' \u005C) that are part of an element value must be escaped by prefixing them with a reverse solidus. In practice, this requires escaping with two reverse solidi because a reverse solidus must already be escaped in strings.

      Instead of doing the escaping manually (and always use quoted strings) I would rather leverage aQute.bnd.header.OSGiHeader

      Attachments

        Issue Links

          Activity

            People

              kwin Konrad Windszus
              kwin Konrad Windszus
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: