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

Chris Ridd
30.27.2014 6380b1a54846b4a467a5afd1d87d31aee940fa35
Fix OPENDJ-1508: Allow "=" in malformed attribute options
2 files modified
20 ■■■■ changed files
opendj-core/src/main/java/com/forgerock/opendj/util/ASCIICharProp.java 8 ●●●●● patch | view | raw | blame | history
opendj-core/src/test/java/com/forgerock/opendj/util/ASCIICharPropTestCase.java 12 ●●●●● patch | view | raw | blame | history
opendj-core/src/main/java/com/forgerock/opendj/util/ASCIICharProp.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2009 Sun Microsystems, Inc.
 *      Portions copyright 2011 ForgeRock AS
 *      Portions copyright 2011-2014 ForgeRock AS
 */
package com.forgerock.opendj.util;
@@ -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-core/src/test/java/com/forgerock/opendj/util/ASCIICharPropTestCase.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2010 Sun Microsystems, Inc.
 *      Portions copyright 2011 ForgeRock AS
 *      Portions copyright 2011-2014 ForgeRock AS
 */
package com.forgerock.opendj.util;
@@ -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