summaryrefslogtreecommitdiffstats
path: root/lib/Auth/LDAP.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Auth/LDAP.php')
-rw-r--r--lib/Auth/LDAP.php12
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);
}