aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib/Access.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/user_ldap/lib/Access.php')
-rw-r--r--apps/user_ldap/lib/Access.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php
index 6b12e0edc11..1cc0c62ff1d 100644
--- a/apps/user_ldap/lib/Access.php
+++ b/apps/user_ldap/lib/Access.php
@@ -1376,7 +1376,7 @@ class Access extends LDAPUtility {
$name = preg_replace('/[^a-zA-Z0-9_.@-]/u', '', $name);
if (strlen($name) > 64) {
- $name = (string)hash('sha256', $name, false);
+ $name = hash('sha256', $name, false);
}
if ($name === '') {
@@ -1389,7 +1389,7 @@ class Access extends LDAPUtility {
public function sanitizeGroupIDCandidate(string $candidate): string {
$candidate = trim($candidate);
if (strlen($candidate) > 64) {
- $candidate = (string)hash('sha256', $candidate, false);
+ $candidate = hash('sha256', $candidate, false);
}
if ($candidate === '') {
throw new \InvalidArgumentException('provided name template for username does not contain any allowed characters');