diff --git a/apps/files_external/lib/Lib/ApplicableHelper.php b/apps/files_external/lib/Lib/ApplicableHelper.php index 1c603ec2c647b..5f1a5c433d888 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; } } @@ -99,7 +99,7 @@ public function diffApplicable(StorageConfig $a, StorageConfig $b): \Iterator { } } foreach ($a->getApplicableUsers() as $userId) { - if (!in_array($userId, $b->getApplicableUsers())) { + if (!in_array($userId, $b->getApplicableUsers(), true)) { $user = $this->userManager->get($userId); if ($user && !$this->isApplicableForUser($b, $user)) { if (!isset($yielded[$user->getUID()])) { diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 742c9da0c2644..3d2ab5ffb297e 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -2264,7 +2264,7 @@ public function getUidAndFilename($filename) { throw new NotFoundException($this->getAbsolutePath($filename) . ' not found'); } $uid = $info->getOwner()->getUID(); - if ($uid != \OC_User::getUser()) { + if ($uid !== \OC_User::getUser()) { Filesystem::initMountPoints($uid); $ownerView = new View('/' . $uid . '/files'); try { 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); } }