Commit 849f937d authored by Ondřej Kuzník's avatar Ondřej Kuzník Committed by Quanah Gibson-Mount
Browse files

ITS#8842 Do some printability checks on the dc RDN

parent dde4f0b0
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "ldap-int.h" #include "ldap-int.h"
#include "ldap_schema.h" #include "ldap_schema.h"
#include "ldif.h"
/* extension to UFN that turns trailing "dc=value" rdns in DNS style, /* extension to UFN that turns trailing "dc=value" rdns in DNS style,
* e.g. "ou=People,dc=openldap,dc=org" => "People, openldap.org" */ * e.g. "ou=People,dc=openldap,dc=org" => "People, openldap.org" */
...@@ -2478,6 +2479,11 @@ dn2domain( LDAPDN dn, struct berval *bv, int pos, int *iRDN ) ...@@ -2478,6 +2479,11 @@ dn2domain( LDAPDN dn, struct berval *bv, int pos, int *iRDN )
break; break;
} }
if ( ldif_is_not_printable( ava->la_value.bv_val, ava->la_value.bv_len ) ) {
domain = 0;
break;
}
domain = 1; domain = 1;
if ( first ) { if ( first ) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment