From: Arthur Schiwon Date: Mon, 25 Jun 2012 18:53:31 +0000 (+0200) Subject: LDAP: compare base trees case insensitively X-Git-Tag: v4.5.0beta1~74^2~403^2~12 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fb53708d10924ee63749439b0c51029093a04b78;p=nextcloud-server.git LDAP: compare base trees case insensitively --- diff --git a/apps/user_ldap/lib_ldap.php b/apps/user_ldap/lib_ldap.php index 2940e1d8252..21c4e57e293 100644 --- a/apps/user_ldap/lib_ldap.php +++ b/apps/user_ldap/lib_ldap.php @@ -171,7 +171,7 @@ class OC_LDAP { * returns the internal ownCloud name for the given LDAP DN of the group */ 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 self::dn2ocname($dn, $ldapname, false); @@ -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 */ 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 self::dn2ocname($dn, $ldapname, true);