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

sort prefixes for deterministic LDAP query behaviour

parent fc181167
No related branches found
No related tags found
No related merge requests found
...@@ -83,6 +83,7 @@ class Helper { ...@@ -83,6 +83,7 @@ class Helper {
$len = strlen($key) - strlen($referenceConfigkey); $len = strlen($key) - strlen($referenceConfigkey);
$prefixes[] = substr($key, 0, $len); $prefixes[] = substr($key, 0, $len);
} }
asort($prefixes);
return $prefixes; return $prefixes;
} }
...@@ -212,7 +213,7 @@ class Helper { ...@@ -212,7 +213,7 @@ class Helper {
return $domain; return $domain;
} }
/** /**
* *
* Set the LDAPProvider in the config * Set the LDAPProvider in the config
...@@ -224,7 +225,7 @@ class Helper { ...@@ -224,7 +225,7 @@ class Helper {
\OC::$server->getConfig()->setSystemValue('ldapProviderFactory', LDAPProviderFactory::class); \OC::$server->getConfig()->setSystemValue('ldapProviderFactory', LDAPProviderFactory::class);
} }
} }
/** /**
* sanitizes a DN received from the LDAP server * sanitizes a DN received from the LDAP server
* @param array $dn the DN in question * @param array $dn the DN in question
...@@ -267,7 +268,7 @@ class Helper { ...@@ -267,7 +268,7 @@ class Helper {
return $dn; return $dn;
} }
/** /**
* converts a stored DN so it can be used as base parameter for LDAP queries, internally we store them for usage in LDAP filters * converts a stored DN so it can be used as base parameter for LDAP queries, internally we store them for usage in LDAP filters
* @param string $dn the DN * @param string $dn the DN
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment