From: Andrew Bartlett Date: Fri, 14 Nov 2008 06:16:39 +0000 (+1100) Subject: Always validate a DN when constructing from a string in python X-Git-Tag: samba-4.0.0alpha6~480^2~209^2~31 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9abd45979ee0415c16775f6dfd17a6e421091d5c;p=thirdparty%2Fsamba.git Always validate a DN when constructing from a string in python --- diff --git a/source4/lib/ldb/ldb.i b/source4/lib/ldb/ldb.i index 6187096ab96..6ecbfbfa08a 100644 --- a/source4/lib/ldb/ldb.i +++ b/source4/lib/ldb/ldb.i @@ -216,7 +216,7 @@ typedef struct ldb_dn { we do it this way... */ talloc_steal(NULL, ret); - if (ret == NULL) + if (ret == NULL || !ldb_dn_validate(ret)) SWIG_exception(SWIG_ValueError, "unable to parse dn string"); fail: