Uploaded image for project: 'Directory Studio'
  1. Directory Studio
  2. DIRSTUDIO-959

Exporting schemas as OpenLDAP files does not use proper escaping

    Details

      Description

      To reproduce:
      1. Create an ApacheDS schema file containing an attribute type with the following attribute:

      m-description: Object's attribute

      2. Import the schema, export it as OpenLDAP schema

      The exported file will include

      DESC 'Object's attribute'

      so it will have invalid syntax.

      I have not checked other characters that will need to be escaped when exported to OpenLDAP schema.

        Activity

        Hide
        seelmann Stefan Seelmann added a comment -

        OpenLDAP schema is written in org.apache.directory.studio.schemaeditor.model.io.OpenLdapSchemaFileExporter, the required escaping is missing. There are two other classes in API project (org.apache.directory.api.ldap.model.schema.DescriptionUtils and org.apache.directory.api.ldap.model.schema.SchemaUtils) that create string representations of schema objects. We should try refactor the code so that we only have one correct schema renderer.

        Show
        seelmann Stefan Seelmann added a comment - OpenLDAP schema is written in org.apache.directory.studio.schemaeditor.model.io.OpenLdapSchemaFileExporter, the required escaping is missing. There are two other classes in API project (org.apache.directory.api.ldap.model.schema.DescriptionUtils and org.apache.directory.api.ldap.model.schema.SchemaUtils) that create string representations of schema objects. We should try refactor the code so that we only have one correct schema renderer.
        Hide
        seelmann Stefan Seelmann added a comment -

        Moved schema render utilities to new SchemaObjectRenderer class in API project:

        Show
        seelmann Stefan Seelmann added a comment - Moved schema render utilities to new SchemaObjectRenderer class in API project: http://svn.apache.org/r1545951 http://svn.apache.org/r1545954

          People

          • Assignee:
            seelmann Stefan Seelmann
            Reporter:
            pkubowicz Piotr Kubowicz
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development