diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-02-07 18:10:31 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-02-07 18:10:31 +0100 |
commit | a0e57ea6d320ae543cb092c51b610dc2318be56d (patch) | |
tree | 06b553102d2c529177a0fee012680b143258eb1d /apps | |
parent | fc18116715e62f777074111a8d7a3a52601c2cef (diff) | |
download | nextcloud-server-a0e57ea6d320ae543cb092c51b610dc2318be56d.tar.gz nextcloud-server-a0e57ea6d320ae543cb092c51b610dc2318be56d.zip |
sort prefixes for deterministic LDAP query behaviour
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/user_ldap/lib/Helper.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/user_ldap/lib/Helper.php b/apps/user_ldap/lib/Helper.php index bf2cd2e2bf1..4279ea72c71 100644 --- a/apps/user_ldap/lib/Helper.php +++ b/apps/user_ldap/lib/Helper.php @@ -83,6 +83,7 @@ class Helper { $len = strlen($key) - strlen($referenceConfigkey); $prefixes[] = substr($key, 0, $len); } + asort($prefixes); return $prefixes; } @@ -212,7 +213,7 @@ class Helper { return $domain; } - + /** * * Set the LDAPProvider in the config @@ -224,7 +225,7 @@ class Helper { \OC::$server->getConfig()->setSystemValue('ldapProviderFactory', LDAPProviderFactory::class); } } - + /** * sanitizes a DN received from the LDAP server * @param array $dn the DN in question @@ -267,7 +268,7 @@ class Helper { 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 * @param string $dn the DN |