From 9db6c7d9c2c2a803d9a02a39b0ff439c5c4eb997 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Fri, 2 Mar 2018 16:26:36 +0100 Subject: [PATCH] use hash algo that's robust against collisions Signed-off-by: Arthur Schiwon --- apps/user_ldap/lib/Connection.php | 2 +- apps/user_ldap/lib/Proxy.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/user_ldap/lib/Connection.php b/apps/user_ldap/lib/Connection.php index 1fbb8e3df1fec..8c8a63ca532d8 100644 --- a/apps/user_ldap/lib/Connection.php +++ b/apps/user_ldap/lib/Connection.php @@ -208,7 +208,7 @@ private function getCacheKey($key) { 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 96bb670b789f7..9ff3fc92d6792 100644 --- a/apps/user_ldap/lib/Proxy.php +++ b/apps/user_ldap/lib/Proxy.php @@ -161,7 +161,7 @@ private function getCacheKey($key) { if(is_null($key)) { return $prefix; } - return $prefix.md5($key); + return $prefix.hash('sha256', $key); } /**