summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2018-03-02 16:26:36 +0100
committerArthur Schiwon <blizzz@arthur-schiwon.de>2018-03-05 13:20:22 +0100
commit962b046ab54fed2c35e66688d20a123196b20d41 (patch)
tree48dc501cbbf342795231040fb93cd636b10079aa
parent6104a7043e9300421ed2ba430a08f1da755e8cbf (diff)
downloadnextcloud-server-962b046ab54fed2c35e66688d20a123196b20d41.tar.gz
nextcloud-server-962b046ab54fed2c35e66688d20a123196b20d41.zip
use hash algo that's robust against collisions
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
-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 5105c12a22f..ab1ab11de47 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);
}
/**