summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/common/ldb_dn.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source4/lib/ldb/common/ldb_dn.c b/source4/lib/ldb/common/ldb_dn.c
index ea7c6b5f69..a277c71ba2 100644
--- a/source4/lib/ldb/common/ldb_dn.c
+++ b/source4/lib/ldb/common/ldb_dn.c
@@ -292,6 +292,12 @@ static bool ldb_dn_explode(struct ldb_dn *dn)
/* first char */
trim = false;
+ if (!isascii(*p)) {
+ /* attr names must be ascii only */
+ dn->invalid = true;
+ goto failed;
+ }
+
if (isdigit(*p)) {
is_oid = true;
} else
@@ -338,6 +344,12 @@ static bool ldb_dn_explode(struct ldb_dn *dn)
continue;
}
+ if (!isascii(*p)) {
+ /* attr names must be ascii only */
+ dn->invalid = true;
+ goto failed;
+ }
+
if (is_oid && ( ! (isdigit(*p) || (*p == '.')))) {
/* not a digit nor a dot, invalid attribute oid */
dn->invalid = true;