Selaa lähdekoodia

Remove redundant cast to string in user_ldap

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
tags/v26.0.0beta1
Côme Chilliet 1 vuosi sitten
vanhempi
commit
3c0b1bdc30
No account linked to committer's email address
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2
    2
      apps/user_ldap/lib/Access.php

+ 2
- 2
apps/user_ldap/lib/Access.php Näytä tiedosto

@@ -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');

Loading…
Peruuta
Tallenna