mirror of
https://github.com/nextcloud/server.git
synced 2026-06-03 13:58:55 -04:00
fix(user_ldap): Fix crash in some code path when a DN is longer that 64
UserConfig throws in this case. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
abb135e64d
commit
8caeb11991
1 changed files with 8 additions and 3 deletions
|
|
@ -163,9 +163,14 @@ class Manager {
|
|||
* @return bool
|
||||
*/
|
||||
public function isDeletedUser($id) {
|
||||
$isDeleted = $this->ocConfig->getUserValue(
|
||||
$id, 'user_ldap', 'isDeleted', 0);
|
||||
return (int)$isDeleted === 1;
|
||||
try {
|
||||
$isDeleted = $this->ocConfig->getUserValue($id, 'user_ldap', 'isDeleted', 0);
|
||||
return (int)$isDeleted === 1;
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
// Most likely the string is too long to be a valid user id
|
||||
$this->logger->debug('Invalid id given to isDeletedUser', ['exception' => $e]);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue