Skip to content

Commit 2dc82d4

Browse files
authored
Merge pull request #8655 from nextcloud/stable12-8630
[stable12] use hash algo that's robust against collisions
2 parents af8d300 + 9db6c7d commit 2dc82d4

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

apps/user_ldap/lib/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ private function getCacheKey($key) {
208208
if(is_null($key)) {
209209
return $prefix;
210210
}
211-
return $prefix.md5($key);
211+
return $prefix.hash('sha256', $key);
212212
}
213213

214214
/**

apps/user_ldap/lib/Proxy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ private function getCacheKey($key) {
161161
if(is_null($key)) {
162162
return $prefix;
163163
}
164-
return $prefix.md5($key);
164+
return $prefix.hash('sha256', $key);
165165
}
166166

167167
/**

0 commit comments

Comments
 (0)