зеркало из https://github.com/nextcloud/server.git
Remove redundant cast to string in user_ldap
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Родитель
e4a780127d
Коммит
3c0b1bdc30
|
@ -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');
|
||||
|
|
Загрузка…
Ссылка в новой задаче