Always validate a DN when constructing from a string in python
authorAndrew Bartlett <abartlet@samba.org>
Fri, 14 Nov 2008 06:16:39 +0000 (17:16 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Sun, 16 Nov 2008 23:05:37 +0000 (10:05 +1100)
source4/lib/ldb/ldb.i

index 6187096ab96a8c3d832f22794d1815bb44d68f56..6ecbfbfa08acf08bfc4d1c0fda660b59b9aa7ef9 100644 (file)
@@ -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: