Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-6994

strict-format-country-string does not affect the server

    Details

      Description

      The CoreSchemaProvider has a strict-format-country-string property, which does not appear to be used by the CountryStringSyntaxImpl.isValueAcceptable() method. cf JpegSyntaxImpl.isValueAcceptable().

      Steps to Reproduce

      $ ./setup \
                --serverId OPENDJ-6994 \
                --deploymentKeyPassword password \
                --rootUserDn uid=admin \
                --rootUserPassword password \
                --hostname acheron.local \
                --adminConnectorPort 4444 \
                --ldapPort 389 \
                --replicationPort 8989 \
                --profile ds-evaluation \
                --set ds-evaluation/generatedUsers:1000
      
      $ bin/dsconfig set-schema-provider-prop \
                --provider-name Core\ Schema \
                --set strict-format-country-string:false \
                --hostname acheron.local \
                --port 4444 \
                --bindDn uid=admin \
                --trustAll \
                --bindPassword password \
                --no-prompt
      
      $ bin/ldapmodify -h localhost -p 389 -D uid=admin -w password <<LDIF
      dn: c=GB,dc=example,dc=com
      changetype: add
      c: GB
      objectclass: country
      
      dn: c=FOO,dc=example,dc=com
      changetype: add
      c: FOO
      objectclass: country
      LDIF
      

      Expected Results

      Two country entries should be added.

      Actual Results

      The add of the c=FOO entry fails due to:

      # The LDAP modify request failed: 21 (Invalid Attribute Syntax)
      # Additional Information:  Entry "c=FOO,dc=example,dc=com" contains a value "FOO" for attribute c that is invalid according to the syntax for that attribute: The provided value "FOO" is not a valid country string because the length is not exactly two characters
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ondrej.fuchsik Ondrej Fuchsik
                Reporter:
                cjr Chris Ridd
                Dev Assignee:
                Chris Ridd
                QA Assignee:
                Ondrej Fuchsik
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: