Skip to content
Snippets Groups Projects
Commit a72eddee authored by Arthur Schiwon's avatar Arthur Schiwon
Browse files

LDAP: compare base trees case insensitively

parent b1f3364e
Branches
No related tags found
No related merge requests found
...@@ -171,7 +171,7 @@ class OC_LDAP { ...@@ -171,7 +171,7 @@ class OC_LDAP {
* returns the internal ownCloud name for the given LDAP DN of the group * returns the internal ownCloud name for the given LDAP DN of the group
*/ */
static public function dn2groupname($dn, $ldapname = null) { static public function dn2groupname($dn, $ldapname = null) {
if(strrpos($dn, self::$ldapBaseGroups) !== (strlen($dn)-strlen(self::$ldapBaseGroups))) { if(strripos($dn, self::$ldapBaseGroups) !== (strlen($dn)-strlen(self::$ldapBaseGroups))) {
return false; return false;
} }
return self::dn2ocname($dn, $ldapname, false); return self::dn2ocname($dn, $ldapname, false);
...@@ -186,7 +186,7 @@ class OC_LDAP { ...@@ -186,7 +186,7 @@ class OC_LDAP {
* returns the internal ownCloud name for the given LDAP DN of the user, false on DN outside of search DN * returns the internal ownCloud name for the given LDAP DN of the user, false on DN outside of search DN
*/ */
static public function dn2username($dn, $ldapname = null) { static public function dn2username($dn, $ldapname = null) {
if(strrpos($dn, self::$ldapBaseUsers) !== (strlen($dn)-strlen(self::$ldapBaseUsers))) { if(strripos($dn, self::$ldapBaseUsers) !== (strlen($dn)-strlen(self::$ldapBaseUsers))) {
return false; return false;
} }
return self::dn2ocname($dn, $ldapname, true); return self::dn2ocname($dn, $ldapname, true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment