KEYCLOAK-2679: Fix when importing empty uniqueMember attributes
This commit is contained in:
parent
47652ae179
commit
13d2f872ff
1 changed files with 8 additions and 1 deletions
|
@ -34,7 +34,14 @@ public class LDAPDn {
|
|||
|
||||
public static LDAPDn fromString(String dnString) {
|
||||
LDAPDn dn = new LDAPDn();
|
||||
|
||||
|
||||
// In certain OpenLDAP implementations the uniqueMember attribute is mandatory
|
||||
// Thus, if a new group is created, it will contain an empty uniqueMember attribute
|
||||
// Later on, when adding members, this empty attribute will be kept
|
||||
// Keycloak must be able to process it, properly, w/o throwing an ArrayIndexOutOfBoundsException
|
||||
if(dnString.trim().isEmpty())
|
||||
return dn;
|
||||
|
||||
String[] rdns = dnString.split("(?<!\\\\),");
|
||||
for (String entryStr : rdns) {
|
||||
String[] rdn = entryStr.split("(?<!\\\\)=");
|
||||
|
|
Loading…
Reference in a new issue