@@ -79,7 +79,7 @@ public function addAttributeValues(Entry $entry, string $attribute, array $value
79
79
$ con = $ this ->getConnectionResource ();
80
80
81
81
if (!@ldap_mod_add ($ con , $ entry ->getDn (), [$ attribute => $ values ])) {
82
- throw new LdapException (sprintf ('Could not add values to entry "%s", attribute %s : ' , $ entry ->getDn (), $ attribute ).ldap_error ($ con ));
82
+ throw new LdapException (sprintf ('Could not add values to entry "%s", attribute "%s" : ' , $ entry ->getDn (), $ attribute ).ldap_error ($ con ));
83
83
}
84
84
}
85
85
@@ -94,7 +94,7 @@ public function removeAttributeValues(Entry $entry, string $attribute, array $va
94
94
$ con = $ this ->getConnectionResource ();
95
95
96
96
if (!@ldap_mod_del ($ con , $ entry ->getDn (), [$ attribute => $ values ])) {
97
- throw new LdapException (sprintf ('Could not remove values from entry "%s", attribute %s : ' , $ entry ->getDn (), $ attribute ).ldap_error ($ con ));
97
+ throw new LdapException (sprintf ('Could not remove values from entry "%s", attribute "%s" : ' , $ entry ->getDn (), $ attribute ).ldap_error ($ con ));
98
98
}
99
99
}
100
100
@@ -159,7 +159,7 @@ public function applyOperations(string $dn, iterable $operations): void
159
159
160
160
private function parseRdnFromEntry (Entry $ entry ): string
161
161
{
162
- if (!preg_match ('/^( [^,]+ ),/ ' , $ entry ->getDn (), $ matches )) {
162
+ if (!preg_match ('/(^[^, \\\\ ]*(?: \\\\ . [^,\\\\ ]*)* ),/ ' , $ entry ->getDn (), $ matches )) {
163
163
throw new LdapException (sprintf ('Entry "%s" malformed, could not parse RDN. ' , $ entry ->getDn ()));
164
164
}
165
165
0 commit comments