From 6380b1a54846b4a467a5afd1d87d31aee940fa35 Mon Sep 17 00:00:00 2001
From: Chris Ridd <chris.ridd@forgerock.com>
Date: Mon, 30 Jun 2014 09:27:45 +0000
Subject: [PATCH] Fix OPENDJ-1508: Allow "=" in malformed attribute options
---
opendj-core/src/main/java/com/forgerock/opendj/util/ASCIICharProp.java | 8 +++++---
opendj-core/src/test/java/com/forgerock/opendj/util/ASCIICharPropTestCase.java | 12 +++++++++++-
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/opendj-core/src/main/java/com/forgerock/opendj/util/ASCIICharProp.java b/opendj-core/src/main/java/com/forgerock/opendj/util/ASCIICharProp.java
index cb5b6df..e849f4e 100644
--- a/opendj-core/src/main/java/com/forgerock/opendj/util/ASCIICharProp.java
+++ b/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
diff --git a/opendj-core/src/test/java/com/forgerock/opendj/util/ASCIICharPropTestCase.java b/opendj-core/src/test/java/com/forgerock/opendj/util/ASCIICharPropTestCase.java
index 04545bb..eee500e 100644
--- a/opendj-core/src/test/java/com/forgerock/opendj/util/ASCIICharPropTestCase.java
+++ b/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
--
Gitblit v1.10.0