summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2018-03-05 12:34:07 +0100
committerGitHub <noreply@github.com>2018-03-05 12:34:07 +0100
commitc85c64c787057afac7000c0c24a7b791f4788c55 (patch)
tree0a2377a5a1a9da7749b85ba81e8ef163bef96ce9 /apps
parent3ced2c7ab25ae6c7f64d96a4b16754f902a9689f (diff)
parent04f7252fc47ecba9a9d65518d39a79a17254e0da (diff)
downloadnextcloud-server-c85c64c787057afac7000c0c24a7b791f4788c55.tar.gz
nextcloud-server-c85c64c787057afac7000c0c24a7b791f4788c55.zip
Merge pull request #8630 from nextcloud/ldap-cachekey-sha256
use hash algo that's robust against collisions
Diffstat (limited to 'apps')
-rw-r--r--apps/user_ldap/lib/Connection.php2
-rw-r--r--apps/user_ldap/lib/Proxy.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/Connection.php b/apps/user_ldap/lib/Connection.php
index d2d8bc7395e..53e1882bd65 100644
--- a/apps/user_ldap/lib/Connection.php
+++ b/apps/user_ldap/lib/Connection.php
@@ -218,7 +218,7 @@ class Connection extends LDAPUtility {
if(is_null($key)) {
return $prefix;
}
- return $prefix.md5($key);
+ return $prefix.hash('sha256', $key);
}
/**
diff --git a/apps/user_ldap/lib/Proxy.php b/apps/user_ldap/lib/Proxy.php
index dc8c6fc77cc..ab5434f9fe5 100644
--- a/apps/user_ldap/lib/Proxy.php
+++ b/apps/user_ldap/lib/Proxy.php
@@ -163,7 +163,7 @@ abstract class Proxy {
if($key === null) {
return $prefix;
}
- return $prefix.md5($key);
+ return $prefix.hash('sha256', $key);
}
/**