diff options
author | Aleksander Machniak <machniak@kolabsys.com> | 2014-11-14 06:51:22 -0500 |
---|---|---|
committer | Aleksander Machniak <machniak@kolabsys.com> | 2014-11-14 06:51:22 -0500 |
commit | b0833fcc63d5b8d5ad94d3aff32a0af99aa06516 (patch) | |
tree | ef61d04b90f8664e901755efe37f52de8e2e3f2c /lib/Auth/LDAP.php | |
parent | f72814ba757989552b0c8037027608d9ad0a41d8 (diff) | |
download | webadmin-b0833fcc63d5b8d5ad94d3aff32a0af99aa06516.tar.gz |
Fix handling of special characters in RDN attributes (#3905)
Fix update of objects which base DN contains special characters (#3824)
Diffstat (limited to 'lib/Auth/LDAP.php')
-rw-r--r-- | lib/Auth/LDAP.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Auth/LDAP.php b/lib/Auth/LDAP.php index d711c16..eab0b32 100644 --- a/lib/Auth/LDAP.php +++ b/lib/Auth/LDAP.php @@ -562,7 +562,7 @@ class LDAP extends Net_LDAP3 { // TODO: The rdn is configurable as well. // Use [$type_str . "_"]user_rdn_attr - $dn = "cn=" . $attrs['cn'] . "," . $base_dn; + $dn = "cn=" . Net_LDAP3::quote_string($attrs['cn'], true) . "," . $base_dn; return $this->entry_add($dn, $attrs); } @@ -734,7 +734,7 @@ class LDAP extends Net_LDAP3 { // TODO: The rdn is configurable as well. // Use [$type_str . "_"]ou_rdn_attr - $dn = "ou=" . $attrs['ou'] . "," . $base_dn; + $dn = "ou=" . Net_LDAP3::quote_string($attrs['ou'], true) . "," . $base_dn; return $this->entry_add($dn, $attrs); } @@ -792,7 +792,7 @@ class LDAP extends Net_LDAP3 { // TODO: The rdn is configurable as well. // Use [$type_str . "_"]resource_rdn_attr - $dn = "cn=" . $attrs['cn'] . "," . $base_dn; + $dn = "cn=" . Net_LDAP3::quote_string($attrs['cn'], true) . "," . $base_dn; return $this->entry_add($dn, $attrs); } @@ -843,7 +843,7 @@ class LDAP extends Net_LDAP3 { // TODO: The rdn is configurable as well. // Use [$type_str . "_"]role_rdn_attr - $dn = "cn=" . $attrs['cn'] . "," . $base_dn; + $dn = "cn=" . Net_LDAP3::quote_string($attrs['cn'], true) . "," . $base_dn; return $this->entry_add($dn, $attrs); } @@ -895,7 +895,7 @@ class LDAP extends Net_LDAP3 { // TODO: The rdn is configurable as well. // Use [$type_str . "_"]user_rdn_attr - $dn = "cn=" . $attrs['cn'] . "," . $base_dn; + $dn = "cn=" . Net_LDAP3::quote_string($attrs['cn'], true) . "," . $base_dn; return $this->entry_add($dn, $attrs); } @@ -967,7 +967,7 @@ class LDAP extends Net_LDAP3 { // TODO: The rdn is configurable as well. // Use [$type_str . "_"]user_rdn_attr - $dn = "uid=" . $attrs['uid'] . "," . $base_dn; + $dn = "uid=" . Net_LDAP3::quote_string($attrs['uid'], true) . "," . $base_dn; return $this->entry_add($dn, $attrs); } |