diff --git a/apps/files_external/lib/Lib/ApplicableHelper.php b/apps/files_external/lib/Lib/ApplicableHelper.php index 1c603ec2c647b..9b61a3e7f8611 100644 --- a/apps/files_external/lib/Lib/ApplicableHelper.php +++ b/apps/files_external/lib/Lib/ApplicableHelper.php @@ -51,12 +51,12 @@ public function isApplicableForUser(StorageConfig $storage, IUser $user): bool { if (count($storage->getApplicableUsers()) + count($storage->getApplicableGroups()) === 0) { return true; } - if (in_array($user->getUID(), $storage->getApplicableUsers())) { + if (in_array($user->getUID(), $storage->getApplicableUsers(), true)) { return true; } $groupIds = $this->groupManager->getUserGroupIds($user); foreach ($groupIds as $groupId) { - if (in_array($groupId, $storage->getApplicableGroups())) { + if (in_array($groupId, $storage->getApplicableGroups(), true)) { return true; } } diff --git a/lib/private/GlobalScale/Config.php b/lib/private/GlobalScale/Config.php index be35487f3c314..6edd0442f4843 100644 --- a/lib/private/GlobalScale/Config.php +++ b/lib/private/GlobalScale/Config.php @@ -52,7 +52,7 @@ public function isSecondary(): bool { #[Override] public function isPrimaryAdmin(string $userId): bool { - return in_array($userId, $this->config->getSystemValue('gss.master.admin', [])) - || in_array($userId, $this->config->getSystemValue('gss.primary.admin', [])); + return in_array($userId, $this->config->getSystemValue('gss.master.admin', []), true) + || in_array($userId, $this->config->getSystemValue('gss.primary.admin', []), true); } } diff --git a/lib/private/TaskProcessing/Manager.php b/lib/private/TaskProcessing/Manager.php index af6b016192ef1..e2d85cd676490 100644 --- a/lib/private/TaskProcessing/Manager.php +++ b/lib/private/TaskProcessing/Manager.php @@ -1649,7 +1649,7 @@ private function validateUserAccessToFile(mixed $fileId, ?string $userId): void } $mounts = $this->userMountCache->getMountsForFileId($fileId); $userIds = array_map(fn ($mount) => $mount->getUser()->getUID(), $mounts); - if (!in_array($userId, $userIds)) { + if (!in_array($userId, $userIds, true)) { throw new UnauthorizedException('User ' . $userId . ' does not have access to file ' . $fileId); } }