mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Chris Ridd
30.34.2014 d5e770962a3c79d68485d6bb5691cbdac4e741a8
Backport fix for OPENDJ-1508: Allow "=" in malformed attribute options
2 files modified
16 ■■■■ changed files
opendj-ldap-sdk/src/main/java/com/forgerock/opendj/util/ASCIICharProp.java 6 ●●●●● patch | view | raw | blame | history
opendj-ldap-sdk/src/test/java/com/forgerock/opendj/util/ASCIICharPropTestCase.java 10 ●●●●● patch | view | raw | blame | history
opendj-ldap-sdk/src/main/java/com/forgerock/opendj/util/ASCIICharProp.java
@@ -164,7 +164,7 @@
            this.isDigit = false;
            this.isLetter = false;
            this.isKeyChar = c == '-';
            this.isCompatKeyChar = (c == '-') || (c == '.') || (c == '_');
            this.isCompatKeyChar = (c == '-') || (c == '.') || (c == '_') || (c == '=');
            this.isHexChar = false;
            this.hexValue = -1;
            this.decimalValue = -1;
@@ -255,8 +255,10 @@
     * will be permitted:
     *
     * <pre>
     * USCORE  = %x5F ; underscore ("_")
     * HYPHEN  = %x2D ; hyphen ("-")
     * DOT     = %x2E ; period (".")
     * EQUALS  = %x3D ; equals sign ("=")
     * USCORE  = %x5F ; underscore ("_")
     * </pre>
     *
     * @param allowCompatChars
opendj-ldap-sdk/src/test/java/com/forgerock/opendj/util/ASCIICharPropTestCase.java
@@ -106,6 +106,16 @@
                false  // is compat key char
            },
            {
                '=',
                false, // uppercase
                -1,    // hex
                -1,    // decimal
                false, // is letter
                false, // is digit
                false, // is key char
                true  // is compat key char
            },
            {
                'a',
                false, // uppercase
                10,    // hex